Home

Awesome

shell-fns

Minimalist plugins for bash and zsh.

Installation

Clone the repository in your local machine:

git clone --depth 1 https://github.com/Hdoc1509/shell-fns.git ~/.shell-fns

Usage

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

Plugins

Built-in aliases

AliasCommand
sfCfcd ~/.shell-fns; ${SF_EDITOR} .
pathecho -e "${PATH//:/\\n}"
mkdmkdir -p
..cd ..
.1cd ..
.2cd ../..
.3cd ../../..
cclear
zzexit
rmrm -r
rmfrm -rf
cpcp -rv

Global variables

These variables are required and are used by some plugins:

Colored messages

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:

Updates

If you want to update shell-fns, you just need to run:

shell_fns_update