Skip to content

Instantly share code, notes, and snippets.

@alandotcom
Last active August 29, 2016 19:43
Show Gist options
  • Save alandotcom/947120ce9442f04f29fe15439c07c72f to your computer and use it in GitHub Desktop.
Save alandotcom/947120ce9442f04f29fe15439c07c72f to your computer and use it in GitHub Desktop.
set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set red (set_color red)
set gray (set_color -o black)
# Fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
set __fish_git_prompt_showuntrackedfiles 'yes'
set __fish_git_prompt_showupstream 'yes'
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_color_upstream_ahead green
set __fish_git_prompt_color_upstream_behind red
# Status Chars
set __fish_git_prompt_char_dirtystate '⚡'
set __fish_git_prompt_char_stagedstate '→'
set __fish_git_prompt_char_untrackedfiles '☡'
set __fish_git_prompt_char_stashstate '↩'
set __fish_git_prompt_char_upstream_ahead '+'
set __fish_git_prompt_char_upstream_behind '-'
function fish_prompt
set last_status $status
if set -q VIRTUAL_ENV
echo -n -s "(" (basename "$VIRTUAL_ENV") ")" " "
end
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
set_color normal
end
alias hr 'history --merge'
function take
if test -z $argv[1]
echo "Requires a target directory"
else
mkdir $argv[1]; and cd $argv[1]
end
end
function take
if test -z $argv[1]
echo "Requires a target directory"
else
mkdir $argv[1]; and cd $argv[1]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment