- Shell 100%
| .shell.d | ||
| .gitignore | ||
| .shell | ||
| .stow-local-ignore | ||
| README.md | ||
posix alias and environment
The configurations should work for bash AND zsh shells.
You can essentially just source one file - the .shell file.
. "$HOME/.shell"
Thats it. done!
User configuration
You can now add userconfiguration in the .shell.d/user.d/ dir. In there, you
should put shellscripts, which work with your configuration. If you need to have
bash and zsh working at the same time, your scripts have to check edge cases.
The easiest way to do this would be to check if [[ -n "$BASH_VERSION" ]] or if [[ -n "$ZSH_VERSION" ]]. You also can get your current shell with
shell=$(shell:get-shell) and then putting that in either an if statement or
case statement to check for "zsh" or "bash"
debugging
With shell:sourced you can view the sourced list of files. It even includes an
ms timestamp, that is fairly accurate (calculated by date +%s%3N before and
after source)
shell:sourced
1| ~/.shell.d/00-colors:1ms
2| ~/.shell.d/01-lib:2ms
3| ~/.shell.d/02-env:139ms
4| ~/.shell.d/03-package-manager:4ms
5| ~/.shell.d/04-alias:9ms
6| ~/.shell.d/98-proxy:76ms
7| ~/.shell.d/99-after:2269ms