Created
October 29, 2014 23:22
-
-
Save jsatk/fbac54ee5da01cf192dd to your computer and use it in GitHub Desktop.
My bash and fish shell prompts
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
| # For Bash. Photo here: http://i.jsatk.us/image/403u443G2k06 | |
| PS1="\n\[$RESET\]┌─▪\[\e]2;$PWD\[\a\]\[\e]1;\]$(basename "$(dirname "$PWD")")/\W\[\a\]\[${BOLD}${MAGENTA}\]\u \[$WHITE\]on \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$RESET\]\n└─▪ " | |
| # For Fish. Photo here: http://i.jsatk.us/image/1Z0m132j181I | |
| function fish_prompt --description 'Write out the prompt' | |
| set -l last_status $status | |
| echo | |
| set_color magenta | |
| printf '☕ ' | |
| printf '%s' (whoami) | |
| set_color normal | |
| printf ' at ' | |
| set_color yellow | |
| printf '%s' (hostname|cut -d . -f 1) | |
| set_color normal | |
| printf ' in ' | |
| set_color $fish_color_cwd | |
| printf '%s' (prompt_pwd) | |
| set_color normal | |
| __terlar_git_prompt | |
| echo | |
| if test $last_status -eq 0 | |
| set_color normal | |
| printf '><((°> ' | |
| else | |
| set_color $fish_color_error | |
| printf '[%d] ><((ˣ> ' $last_status | |
| end | |
| set_color normal | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment