* Optimized statement with REGEX by using `case` REGEX is a great feature of BASH, but in this case it was energy needlessly spent. A `case` statement suffices. Bring in REGEX when you're going to make good use of it, otherwise it's just going to bog down your code. I also wanted to strip the ` || exit 1` on the last line, but I wasn't sure if this file is meant to be sourced or not; if not, then exiting like that is redundant because it will already exit with whichever status the last command provides, unless `popd` specifically offers unhelpful or no exit statuses. * Optimize as before but with 2nd REGEX instance This time is much like the last commit, so I won't repeat, but I will say that you're using a double- or even triple-negative, which obfuscates your goal. Where you were doing... [ ! -n VAR ] && You were basically saying this convolution: If it's true that it's not true that VAR is not empty. Very confusing. Instead, I've opted for: If it's true that Var is empty. Makes immediate sense and is easier to parse, visually speaking. |
||
|---|---|---|
| .github | ||
| aliases/available | ||
| completion/available | ||
| custom | ||
| docs | ||
| lib | ||
| plugins/available | ||
| scripts | ||
| template | ||
| test | ||
| test_lib | ||
| themes | ||
| .ackrc | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| .pre-commit-config.yaml | ||
| .readthedocs.yml | ||
| .shellcheckrc | ||
| 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.