Minimalist plugins for bash and zsh.
Clone the repository in your local machine:
git clone --depth 1 https://github.com/Hdoc1509/shell-fns.git ~/.shell-fns
Source ~/.shell-fns/main.sh
after setting required variables and desired
plugins in your ~/.bashrc
or ~/.zshrc
file:
export SF_EDITOR='subl'
export SF_PLUGINS=( git npm pip )
source ~/.shell-fns/main.sh
- gh
- gh_gist
- gh_issue
- gh_pr
- gh_release
- gh_repo
- git
- neovim
- npm
- nvm
- nvm_win
- pip
- pnpm
- scoop
- vitejs
- wezterm
Alias | Command |
---|---|
sfCf | cd ~/.shell-fns; ${SF_EDITOR} . |
path | echo -e "${PATH//:/\\n}" |
mkd | mkdir -p |
.. | cd .. |
.1 | cd .. |
.2 | cd ../.. |
.3 | cd ../../.. |
c | clear |
zz | exit |
rm | rm -r |
rmf | rm -rf |
cp | cp -rv |
These variables are required and are used by some plugins:
SF_EDITOR
: Editor executable name. Example:subl
,code
,nvim
. It can also be editor functions ofneovim
plugin.
You can print colored messages with echo -e
:
echo -e "Message in ${RED}red color${NOCOLOR} and in ${GREEN}green color${NOCOLOR}"
Be sure to use ${NOCOLOR}
for reset color in your printed message and at the end of the message.
Available colors:
NOCOLOR
RED
GREEN
ORANGE
BLUE
PURPLE
CYAN
LIGHTGRAY
DARKGRAY
LIGHTRED
LIGHTGREEN
YELLOW
LIGHTBLUE
LIGHTPURPLE
LIGHTCYAN
WHITE
If you want to update shell-fns
, you just need to run:
shell_fns_update