jetm / pure

Port of the `pure` ZSH prompt to Fish 🐟

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 🐟

License:MIT License


Languages

Language:Shell 96.9%Language:Makefile 1.6%Language:Dockerfile 1.5%