CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 13:50:10 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"2257c4cb9041b8d7764c093fbea411cd"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=4w0K3jhLclqpNs9sH04ugY8FzEKIiYk4Ydpy0HHFC00uwUsMTw3Zfj1WS9dC9APBL1rJ2hT4Acx44gDt2WqOYmcbxyzzFLr%2BYk8hH8G3KQXXXUDjQL50yMF0%2F%2Bdvx3p0%2FwzoUneMIZ5QWjZcD2laRp%2BrxP49U6%2FEwDKuP4bwz8vDlxX3YG%2B%2FgSETgwreD0aNXSMDwQM7nTcc%2Fb%2BIOc8dqRgitNQMV3T4yAT%2F3GCBmtPJDmyv3EovrP1Zr12fmXA3Y0Hd7wGwAQs3vQAyT1KLZA%3D%3D--4WZSAltKcoXzrV33--%2FwzYEMZ%2FLIWw%2Fo4iOQME7A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1046233103.1753278610; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 13:50:10 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 13:50:10 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: EACE:1A99C5:CBE524:F173E0:6880E892
put this in your .bashrc/.bash_profile... works with both git and svn · GitHub
Show Gist options
Save jamiew/790086 to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
Created
January 21, 2011 17:55
-
Star
14
(14)
You must be signed in to star a gist -
Fork
6
(6)
You must be signed in to fork a gist
-
Save jamiew/790086 to your computer and use it in GitHub Desktop.
put this in your .bashrc/.bash_profile... works with both git and svn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
ref=$(git symbolic-ref -q HEAD 2> /dev/null) || return | |
printf "${1:-(%s)}" "${ref#refs/heads/}" | |
} | |
parse_svn_revision() { | |
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //') | |
[ "$REV" ] || return | |
[ "$(svn st)" ] && DIRTY=' *' | |
echo "(r$REV$DIRTY)" | |
} | |
pimp_prompt() { | |
local BLUE="\[\033[0;34m\]" | |
local BLUE_BOLD="\[\033[1;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" | |
local WHITE="\[\033[0;37m\]" | |
local WHITE_BOLD="\[\033[1;37m\]" | |
local LIGHT_GRAY="\[\033[0;37m\]" | |
case $TERM in | |
xterm*) | |
TITLEBAR='\[\033]0;\u@\h:\w\007\]' | |
;; | |
*) | |
TITLEBAR="" | |
;; | |
esac | |
#PS1="${TITLEBAR}[$WHITE\u@$BLUE_BOLD\h$WHITE \w$GREEN\$(parse_git_branch)\$(parse_svn_revision) $RED\$(~/.rvm/bin/rvm-prompt v g)$WHITE]\$ " | |
PS1="${TITLEBAR}[$WHITE\u@$BLUE_BOLD\h$WHITE \w$GREEN\$(parse_git_branch)\$(parse_svn_revision)$WHITE]\$ " | |
PS2='> ' | |
PS4='+ ' | |
} | |
pimp_prompt |
Cactus, thanks for the notes. Do you have a gist of all your code somewhere?
I am putting this here from my own use as well as others... not entirely sure what the small differences are here: https://en.newinstance.it/2010/05/23/git-autocompletion-and-enhanced-bash-prompt/
autocompletion? This is relevant to my interests...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.
two things.
then I use __git_ps1 in my PS1. This has the added benefit that if I use git-bashcompletion, it provides __git_ps1 which will override my declaration, and gives a more robust ps1 (handles some edge cases).