In: ```bash if [[ -n "$(_git-status | tail -n1)" ]]; then ``` It seems pointless using tail(1); it does nothing here, unless I'm missing something. Also, quotes aren't needed, because word-splitting doesn't apply when variables are expanded in `[[`. ```bash if [[ -n $(_git-status) ]]; then ``` The quoting thing is all over the code, but not a huge deal, as it's just superficial. Variable word-splitting doesn't apply also during the WORD in the case statement, and the VALUE in shell variable assignment. Personally, I would use `[`, since none of the `[[` features are being used here, so it seems wasteful. In the BASH (4.4) source code, assuming I'm looking at it correctly, `[[` is over 800 lines, yet `[` (or `test`) is not even 200; that's part of the reason I prefer `[` and use `[[` when it's actually needed. It's also not a huge deal though, - as this is going to be incredibly fast either way, but thought I'd mention it. |
||
|---|---|---|
| .github | ||
| aliases/available | ||
| completion/available | ||
| custom | ||
| docs | ||
| hooks | ||
| lib | ||
| plugins/available | ||
| scripts | ||
| template | ||
| test | ||
| test_lib | ||
| themes | ||
| vendor | ||
| .ackrc | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .pre-commit-config.yaml | ||
| .readthedocs.yml | ||
| .shellcheckrc | ||
| LICENSE | ||
| bash_it.sh | ||
| clean_files.txt | ||
| install.sh | ||
| lint_clean_files.sh | ||
| uninstall.sh | ||
docs/README.md
Bash-it
Bash-it is a collection of community Bash commands and scripts for Bash 3.2+. (And a shameless ripoff of oh-my-zsh 😃)
Includes autocompletion, themes, aliases, custom functions, a few stolen pieces from Steve Losh, and more.
Bash-it provides a solid framework for using, developing and maintaining shell scripts and custom commands for your daily work.
If you're using the Bourne Again Shell (Bash) regularly and have been looking for an easy way on how to keep all of these nice little scripts and aliases under control, then Bash-it is for you!
Stop polluting your ~/bin directory and your .bashrc file, fork/clone Bash-it and start hacking away.
- Main Page
- Contributing
- Installation
- Help
- Search
- Custom scripts, aliases, themes, and functions
- Themes
- Uninstalling
- Misc
- Help Out
- Contributors
Installation
- Check out a clone of this repo to a location of your choice, such as
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it - Run
~/.bash_it/install.sh
Thats it! 😃
You can check out more components of Bash-it, and customize it to your desire.
For more information, see detailed instructions here.
Contributing
Please take a look at the Contribution Guidelines before reporting a bug or providing a new feature.
The Development Guidelines have more information on some of the internal workings of Bash-it, please feel free to read through this page if you're interested in how Bash-it loads its components.