Skip to content

Instantly share code, notes, and snippets.

@damienstanton
Last active August 29, 2015 14:07
Show Gist options
  • Save damienstanton/18324bfd3c09b04e083b to your computer and use it in GitHub Desktop.
Save damienstanton/18324bfd3c09b04e083b to your computer and use it in GitHub Desktop.
Clean Fish Prompt with Git Stats
# Some Useful Aliases
alias c="clear;ls"
alias ct="clear;tree"
alias lsa="ls -ltra"
alias lss="ls -ltra|less"
alias la="ls -lsa|less"
alias cls="clear"
alias e="exit"
alias gs="git status -uno"
# Custom Pythonista Prompt
set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set gray (set_color -o black)
# Git Stats
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
set __fish_git_prompt_showupstream 'yes'
set __fish_git_prompt_color_branch yellow
# Status Chars
set __fish_git_prompt_char_dirtystate '⚡ '
set __fish_git_prompt_char_stagedstate '→'
set __fish_git_prompt_char_stashstate '↩'
set __fish_git_prompt_char_upstream_ahead '↑'
set __fish_git_prompt_char_upstream_behind '↓'
function fish_prompt
printf '%s ' (__fish_git_prompt)
set_color yellow
printf '%s' (whoami)
set_color normal
printf ' at '
set_color magenta
printf '%s' (hostname|cut -d . -f 1)
set_color normal
printf ' in '
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
# Line 2
echo
if test $VIRTUAL_ENV
printf "" (set_color blue)(basename $VIRTUAL_ENV)(set_color normal)
end
printf '↪ '
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment