Last active
January 11, 2024 09:56
-
-
Save opplatek/150159d6ffb4c500de2246418e0bcded to your computer and use it in GitHub Desktop.
This file contains 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
$ diff /etc/skel/.bashrc ~/.bashrc # to apply the diff run $ patch bashrcToBeChanged bashrc_diff | |
58a59,64 | |
> ## Add git branch name to prompt https://coderwall.com/p/fasnya/add-git-branch-name-to-bash-prompt | |
> parse_git_branch() { | |
> git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
> } | |
> #export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " | |
> | |
60c66,67 | |
< PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
--- | |
> # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
> PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;35m\]$(parse_git_branch)\[\033[00m\]\$ ' | |
82c89 | |
< alias grep='grep --color=auto' | |
--- | |
> alias grep='LC_ALL=C grep --color=auto' # default is without LC_ALL=C | |
117a125,127 | |
> | |
> # Shorten path in prompt | |
> PROMPT_DIRTRIM=3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment