Skip to content

Hdoc1509/shell-fns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

Global variables

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 of neovim plugin.

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:

  • NOCOLOR
  • RED
  • GREEN
  • ORANGE
  • BLUE
  • PURPLE
  • CYAN
  • LIGHTGRAY
  • DARKGRAY
  • LIGHTRED
  • LIGHTGREEN
  • YELLOW
  • LIGHTBLUE
  • LIGHTPURPLE
  • LIGHTCYAN
  • WHITE

Updates

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

shell_fns_update

About

Minimalist plugins for bash and zsh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages