Adding `node` prompt that does not depend on `nvm` and will work with other version managers as well. There are now alternative version managers available, such as a much more streamlined [volta.sh](https://volta.sh). It feels like a deja-vu of `rvm` to `rbenv` switch, all over again. Regardless, we should be able to show the current `node` version whether you are using NVM, VOLTA or a hot potato. I decided not to add dedicated PREFIX variables for now, but it can be done later. We still check if `nvm` prompt returns something first because the `declare` check is practically free, and if it returns something — we use it. Only if the output of NVM is blank do we use the new function to grab the version of NodeJS. There is a caveat — if `node` is installed with the OS, eg `/usr/bin/node` the new function will now pick up the version of that "system" node and show it. Therefore "system" node version will now be visible in the prompt of those who added `node` component to their prompt. Personally, I believe this is the correct behavior, because why should we hide the system node version if that's what's available and in the PATH? We shouldn't. In fact, I think it's rather confusing that previously we wouldn't show the system node version at all. Tested locally on OS-X/bash: * with/without NVM * with/without VOLTA * with/without system node |
||
|---|---|---|
| .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 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
That's 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.
Contributors
License
Bash-it is licensed under the MIT License.
