Skip to content

Instantly share code, notes, and snippets.

@perfecto25
Created February 22, 2018 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perfecto25/0e431bbe3c7c8365ab5a9779d5d70342 to your computer and use it in GitHub Desktop.
Save perfecto25/0e431bbe3c7c8365ab5a9779d5d70342 to your computer and use it in GitHub Desktop.
fish terminal config
set -U fish_user_paths /usr/local/bin /usr/sbin $fish_user_paths
@perfecto25
Copy link
Author

place in ~/.config/fish/config.fish

@perfecto25
Copy link
Author

perfecto25 commented Feb 27, 2018

~/.config/fish.config

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)
set white (set_color white)

# 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_color white -o
  printf '%s ' (hostname)
  set_color normal
  set last_status $status
  set_color $fish_color_cwd
  printf '%s' (prompt_pwd)
  set_color normal

  printf '%s ' (__fish_git_prompt)

  set_color normal
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment