Skip to content

Instantly share code, notes, and snippets.

@gitmin
Created May 12, 2016 23:24
Show Gist options
  • Save gitmin/56053317487ba286d0b473032f94c1a6 to your computer and use it in GitHub Desktop.
Save gitmin/56053317487ba286d0b473032f94c1a6 to your computer and use it in GitHub Desktop.
My fish shell config
# disable fish greeting message
set fish_greeting
# configure fish git prompt
set __fish_git_prompt_showdirtystate 'true'
set __fish_git_prompt_showuntrackedfiles 'true'
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_char_dirtystate '✨ '
set __fish_git_prompt_char_untrackedfiles '🆕 '
# set the directory color in the prompt
set fish_color_cwd green
# background color for search matches
set fish_color_search_match --background=white
# background color for selections
set fish_color_selection --background=white
# frees up ctrl-s and ctrl-q
stty -ixon -ixoff
# make Vim the default editor
set --export EDITOR "vim -f"
# make Vim usable with git
set --export GIT_EDITOR "vim -f"
# use Vim as default pager
set --export PAGER "vimpager"
# set Github API token for Homebrew search
set --export HOMEBREW_GITHUB_API_TOKEN "nope"
# set the go path
set --export GOPATH /usr/local/Go
set --export PATH $GOPATH/bin $PATH
# setup direnv
eval (direnv hook fish)
function fish_prompt --description 'Write out the prompt'
set last_status $status
set_color $fish_color_cwd
printf '%s' (prompt_pwd)
set_color normal
printf '%s' (__fish_git_prompt)
set_color normal
printf ' '
end
function fish_title
switch $_
case fish
echo (prompt_pwd)
case vim
if test -d .git
echo vim \((basename $PWD)\)
else
echo vim
end
case '*'
echo $_
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment