Skip to content
/ pure Public
forked from pure-fish/pure

Port of the `pure` ZSH prompt to Fish 🐟

License

Notifications You must be signed in to change notification settings

smorimoto/pure

 
 

Repository files navigation

✋ Psst! Migrating from v1.x to v2.x? We got you. Check our migration guide and happy upgrading!

pure travis-badge fish-2.5 fish-2.6 fish-2.7.1 fish-3.0.0

Pretty, minimal and fast Fish 🐟 prompt, ported from zsh.

Pure with dark colorscheme Pure with light colorscheme

Install

⚠️ requirements: fish ≥2.5.

Manually

Via cURL:

# Download the installer to `/tmp`
curl git.io/pure-fish --output /tmp/pure_installer.fish --location --silent
# Source and trigger the installer
source /tmp/pure_installer.fish; and install_pure
fisher add rafaelrinaldi/pure
omf install pure
ln -s $OMF_PATH/themes/pure/conf.d/pure.fish ~/.config/fish/conf.d/pure.fish
ln -s $OMF_PATH/themes/pure/conf.d/_pure_init.fish ~/.config/fish/conf.d/pure_init.fish

ℹ️ why the symlink?

fundle plugin rafaelrinaldi/pure;
fundle install;

Features

  • Fully customizable ;
  • Excellent prompt character ;
  • Display current directory tail ;
  • Display git branch name ;
    • Display * when git repository is dirty ;
    • Display when branch is ahead (commits to push) ;
    • Display when branch is behind (commits to pull) ;
  • Change to red when previous command has failed ;
  • Update terminal title with current folder and command ;
  • Display username and hostname when in an SSH session ;
  • Display duration when command run more that 5 seconds ;
  • Display Python virtualenv when activated ;
  • Fine control over colors ;
  • Right prompt control.
  • Display VI mode and custom symbol for non-insert mode.

Configuration

You can tweak pretty much everything in pure by overriding variables in your config.fish file.

Prompt Symbol

Option Default Description
pure_symbol_prompt Prompt symbol.
pure_symbol_reverse_prompt VI non-insert mode symbol.
pure_right_prompt Content of the right prompt.
pure_symbol_git_unpulled_commits Branch is behind upstream (commits to pull).
pure_symbol_git_unpushed_commits Branch is ahead upstream (commits to push).
pure_symbol_git_dirty * Repository is Dirty (uncommitted/untracked changes).
pure_symbol_title_bar_separator

ℹ️: Need safer git symbols?

Features

Option Default Description
pure_threshold_command_duration 5 Show command duration when above this value (seconds).
pure_separate_prompt_on_error false Show last command exit code as a separate character.
pure_begin_prompt_with_current_directory true true: pwd git, SSH, duration.
false: SSH pwd git, duration.
pure_reverse_prompt_symbol_in_vimode true true: indicate a non-insert mode.
false: indicate vi mode with [I], [N], [V].

Colors

Option Default
Base Colors
pure_color_primary (set_color blue)
pure_color_info (set_color cyan)
pure_color_mute (set_color brblack)
pure_color_success (set_color magenta)
pure_color_normal (set_color normal)
pure_color_danger (set_color red)
pure_color_light (set_color white)
pure_color_warning (set_color yellow)
pure_color_dark (set_color black)

ℹ️: Want more customization? See $HOME/.config/fish/conf.d/pure.fish for available variables.

Tests

requirements: fishtape.

fishtape tests/*.test.fish

Maintainers

Kudos to all our awesome 💛 contributors 💛

License

MIT © Rafael Rinaldi


Buy me a ☕

About

Port of the `pure` ZSH prompt to Fish 🐟

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • Shell 97.5%
  • Makefile 1.3%
  • Dockerfile 1.2%