Last active
June 10, 2016 15:18
-
-
Save scottwakefield/73c91b63045717cba076 to your computer and use it in GitHub Desktop.
Fish Shell Config
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
# Navigation Aliases | |
function ..; cd .. ; end | |
function ...; cd ../.. ; end | |
function ....; cd ../../.. ; end | |
function .....; cd ../../../.. ; end | |
# Utilities Aliases | |
function g; git $argv ; end | |
function grep; command grep --color=auto $argv ; end | |
# Shortcuts | |
alias g 'git' | |
alias gs 'git status' | |
alias v 'vim' | |
# 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 -o black | |
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_cleanstate '✔' | |
set __fish_git_prompt_char_dirtystate '+' | |
set __fish_git_prompt_char_stagedstate '•' | |
set __fish_git_prompt_char_stateseparator '|' | |
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 '↓' | |
# Build the prompt | |
function fish_prompt | |
set last_status $status | |
set_color $fish_color_cwd | |
printf '\n%s' (whoami) | |
set_color -o black | |
printf ' in ' | |
set_color $fish_color_cwd_root | |
printf '%s' (prompt_pwd) | |
set_color -o black | |
printf '%s\n' (__fish_git_prompt ' git:%s') | |
set_color normal | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment