Git Product home page Git Product logo

pure's Introduction

✋ 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

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;

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

Features

  • Fully customizable ;
  • Excellent prompt character ;
  • Display current directory tail ;
  • Display git branch name ;
    • Display * when git repository is dirty ;
    • Display when git repository is stashed ;
    • 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 ;
  • Display VI mode and custom symbol for non-insert mode

Configuration

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

set -g pure_symbol_prompt ">"

or by changing universal variables directly in the terminal (which will be preserved between all fish sessions on the computer):

set -U pure_symbol_prompt ">"

Prompt Symbol

Option Default Description
pure_symbol_prompt Prompt symbol.
pure_symbol_reverse_prompt VI non-insert mode symbol.
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_enable_git true Show info about Git repository.
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

You can configure pure colors by changing the values of variables below. The value of these variables can be one of the colors accepted by the set_color command (including various options like --background, -o, --underline, etc.):

set pure_color_success 6638F0 --italics

Variables regulating color for certain features from the second column can also accept one of the base color names:

set pure_color_ssh_user_root pure_color_dark

Take a note on the absence of $ sign before the second argument in this case. By default all feature colors inherit their values from base colors.

Base Color Inherited by Default
pure_color_primary pure_color_current_directory blue
pure_color_info pure_color_git_unpulled_commits
pure_color_git_unpushed_commits
cyan
pure_color_mute pure_color_git_branch
pure_color_git_dirty
pure_color_git_stash
pure_color_ssh_hostname
pure_color_ssh_separator
pure_color_ssh_user_normal
pure_color_virtualenv
brblack
pure_color_success pure_color_prompt_on_success magenta
pure_color_normal pure_color_jobs normal
pure_color_danger pure_color_prompt_on_error red
pure_color_light pure_color_ssh_user_root white
pure_color_warning pure_color_command_duration yellow
pure_color_dark black

Tests

requirements: fishtape.

fishtape tests/*.test.fish

Maintainers

Kudos to all our awesome 💛 contributors 💛

License

MIT © Rafael Rinaldi


Buy me a ☕

pure's People

Contributors

asymmetric avatar benedictleejh avatar bjorngylling avatar boyeln avatar codesections avatar duien avatar edouard-lopez avatar faho avatar filipebarros avatar fundon avatar gpanders avatar jorgebucaran avatar mortnod avatar mwilliammyers avatar oranja avatar orf avatar pierrebeaucamp avatar ponko2 avatar rafaelrinaldi avatar saikocat avatar shougo avatar smh avatar smiller171 avatar sodisdocs avatar ybc37 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.