A fish theme optimized for people who use:
- Solarized
- Git
- Mercurial (requires 'hg prompt')
- SVN
- Unicode-compatible fonts and terminals (Use a Powerline patched font, e.g., from here: https://github.com/powerline/fonts)
- Fish Vi-mode
For Mac users, I highly recommend iTerm 2 + Solarized Dark
- If the previous command failed (✘)
- If private mode is enabled (🔒)
- User @ Hostname (if user is not DEFAULT_USER, which can be set in your profile)
- Git status
- Subversion status enabled by adding
set -g theme_svn_prompt_enabled yes
to yourconfig.fish
. - Mercurial status enabled by adding
set -g theme_mercurial_prompt_enabled yes
to yourconfig.fish
. - Branch () or detached head (➦)
- Current branch / SHA1 in detached head state
- Current branch name is shortened to 15 characters by default. Change it to
N
characters withset -g fish_vcs_branch_name_length N
in yourconfig.fish
.
- Current branch name is shortened to 15 characters by default. Change it to
- Dirty working directory (±, color change)
- By default, git repos will show as dirty if there are untracked files. This can be changed by adding
set -g fish_git_prompt_untracked_files no
to yourconfig.fish
. This value is passed intogit status --untracked-files
, so any value git supports is valid for this command
- By default, git repos will show as dirty if there are untracked files. This can be changed by adding
- Current working directory
- Elevated (root) privileges (⚡)
- Current virtual environment (Python virtualenv and Nix Shell)
You will probably want to disable the default virtualenv prompt. Add to your
init.fish
:set -gx VIRTUAL_ENV_DISABLE_PROMPT 1
- Indicate vi mode.
- Source control blacklist. To disable source control prompts in certain directories, you can add the following to your
init.fish
orconfig.fish
:set -g scm_prompt_blacklist "/path/to/blacklist"
. - The icons can be configured by setting variables. E.g. to replace the icon of failed command from the default "✘" use
set -g glyph_status_nonzero "💀"
. For configuration options seefish_prompt.fish
.
Ported from https://gist.github.com/agnoster/3712874.