Skip to content

Port of the `pure` ZSH prompt to Fish ๐ŸŸ

License

Notifications You must be signed in to change notification settings

codesections-forks/pure

ย 
ย 

Repository files navigation

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

โ„น๏ธ 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 being (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.

Configuration

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

Prompt Symbol

Option Description Default value
pure_symbol_prompt Prompt symbol. โฏ
pure_color_symbol_error $pure_color_red
pure_color_symbol_success $pure_color_magenta

Git

Option Description Default value
pure_symbol_git_arrow_down Symbol for branch ahead (commits to push). โ‡ฃ
pure_symbol_git_arrow_up Symbol for branch being (commits to pull). โ‡ก
pure_symbol_git_dirty Symbol for dirty repository (uncommitted changes). *
pure_color_git_arrows $pure_color_cyan
pure_color_git_branch $pure_color_gray
pure_color_git_dirty $pure_color_gray
โ„น๏ธ: Need safer git symbols?

Terminal Title

Option Description Default value
pure_symbol_horizontal_bar Separator for the terminal title between current working directory and command. โ€”

Base Colors

Option Default value
pure_color_blue (set_color blue)
pure_color_cyan (set_color cyan)
pure_color_gray (set_color brblack)
pure_color_magenta (set_color magenta)
pure_color_normal (set_color normal)
pure_color_red (set_color red)
pure_color_white (set_color white)
pure_color_yellow (set_color yellow)

Components Colors

Option Default value
pure_color_current_folder $pure_color_blue
pure_color_ssh_host $pure_color_gray
pure_color_ssh_separator $pure_color_gray
pure_color_ssh_user_normal $pure_color_gray
pure_color_ssh_user_root $pure_color_white
pure_color_virtualenv $pure_color_gray

Maximum Execution Time

Option Description Default value
pure_command_max_exec_time Maximum execution time of a process before its run time is shown when it exits. 5
pure_color_command_duration $pure_color_yellow

Miscellaneous

Option Description Default value
pure_prompt_begin_with_current_directory true: current directory, git, user@hostname (ssh-only), command duration.
false: user@hostname (ssh-only), current directory, git, command duration.
true
pure_separate_prompt_on_error Show exit code of last command as a separate prompt character โ„น๏ธ false

Right Prompt

Option Description Default value
pure_right_prompt Content of right prompt ""
pure_color_right_prompt $pure_color_normal

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

Packages

No packages published

Languages

  • Shell 96.9%
  • Makefile 1.6%
  • Dockerfile 1.5%