All Projects → pablopunk → bashy

pablopunk / bashy

Licence: MIT License
Extremely fast and simple git prompt for bash and zsh

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to bashy

Promptless
🚀 A super fast and extremely minimal shell prompt.
Stars: ✭ 155 (+260.47%)
Mutual labels:  zsh, prompt
Spaceship Prompt
🚀⭐ A Zsh prompt for Astronauts
Stars: ✭ 15,748 (+36523.26%)
Mutual labels:  zsh, prompt
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+30106.98%)
Mutual labels:  zsh, prompt
Nicy
❄️ a nice and icy zsh and bash prompt in Nim
Stars: ✭ 148 (+244.19%)
Mutual labels:  zsh, prompt
hoard
cli command organizer written in rust
Stars: ✭ 71 (+65.12%)
Mutual labels:  zsh, command
Shelby
Shelby is a fast ⚡️ , lightweight ☁️ , minimal✨, shell prompt written in Go.
Stars: ✭ 148 (+244.19%)
Mutual labels:  zsh, prompt
Common
A simple, clean and minimal prompt.
Stars: ✭ 213 (+395.35%)
Mutual labels:  zsh, prompt
Pure
Pretty, minimal and fast ZSH prompt
Stars: ✭ 10,891 (+25227.91%)
Mutual labels:  zsh, prompt
auto-ls
zsh plugin for auto-ls
Stars: ✭ 77 (+79.07%)
Mutual labels:  zsh, prompt
awesome-git-commands
🍴 Indispensable git commands for everyday use
Stars: ✭ 53 (+23.26%)
Mutual labels:  command, repo
Lean
Pretty, minimal, one-line, fast ZSH prompt
Stars: ✭ 136 (+216.28%)
Mutual labels:  zsh, prompt
zsh-prompt-generator
Zsh Prompt Generator
Stars: ✭ 39 (-9.3%)
Mutual labels:  zsh, prompt
Polyglot
Color, ASCII-only Git prompt for zsh, bash, ksh93, mksh, pdksh, dash, and busybox ash
Stars: ✭ 118 (+174.42%)
Mutual labels:  zsh, prompt
Zsh Prompt Garrett
A prompt with the information you need the moment you need it.
Stars: ✭ 150 (+248.84%)
Mutual labels:  zsh, prompt
Dotfiles
Dotfiles
Stars: ✭ 117 (+172.09%)
Mutual labels:  zsh, command
Agkozak Zsh Prompt
A fast, asynchronous ZSH prompt with color ASCII indicators of Git, exit, SSH, virtual environment, and vi mode status. Framework-agnostic and customizable.
Stars: ✭ 182 (+323.26%)
Mutual labels:  zsh, prompt
Angel Ps1
Your fancy shell prompt fed by your guardian angel
Stars: ✭ 60 (+39.53%)
Mutual labels:  zsh, prompt
Mimir
Fast and minimal shell prompt
Stars: ✭ 90 (+109.3%)
Mutual labels:  zsh, prompt
Silver
A cross-shell customizable powerline-like prompt with icons
Stars: ✭ 238 (+453.49%)
Mutual labels:  zsh, prompt
gitprompt
Display git status in the the terminal prompt
Stars: ✭ 22 (-48.84%)
Mutual labels:  zsh, prompt

Bashy ⚡️⌨️

Extremely fast and simple git prompt for bash

Install

You can use the executable from this repo or install it with npm

npm install -g bashy

Usage

In your ~/.bashrc (linux) or ~/.bash_profile (MacOS) you need to add bashy to your $PS1:

export PS1='$(bashy) $ '

This example will give you the next prompt:

repo at branch✓ $ # if you are in a git repo
folder $ # otherwise

You can also choose a path relative to your home folder with the option -r:

export PS1='$(bashy -r) $ '
# results in
~/repos/bashy at master $

NOTE: Since version 2.5.0 bashy does not support branch status on subdirectories of a repo. This decision meant a 2x increase in performance.

Benchmarks

I've been a zsh user for a long time just for the prompts of oh-my-zsh. But because oh-my-zsh started to slow my prompt so much I decided to go back to bash and make my own customizations.

The first tool I used to do so was vcprompt, but the speed was not improving a lot.

If we compare bashy to other tools like vcprompt we can see is much faster:

$ time vcprompt
real    0m0.094s
user    0m0.037s
sys     0m0.024s

$ time bashy
real    0m0.010s
user    0m0.004s
sys     0m0.003s

Okay, bashy is faster but, come on, 0.094s is still very fast.

Yes and no. While times like those can be indistinguishable for humans, you can totally notice the difference in slower systems and also in fast terminal actions like:

vs_vcprompt

Customization

Okay okay, you don't care so much about the performance because you love customization, and tools like vcprompt are very good at that. While bashy does not have a built in customization option, it's extremely easy to customize. Just edit the script, purely bash, and write your own icons there, add more colors, or even rearrange the branch name and directory. Your imagination is the limit here.

You can use your own modified version of bashy cloning this repo and linking it with npm:

npm remove -g bashy                          # Uninstall the global bashy
git clone https://github.com/pablopunk/bashy # Clone this repo
cd bashy
npm link                                     # Link
bashy                                        # Use it!

Zsh

If you still wanna use ZSH, bashy will work as well as in bash, but you need to set this option on your .zshrc: setopt PROMPT_SUBST.

Author

me
© 2017 Pablo Varela
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].