Skip to content

Hdoc1509/shell-fns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cde1810 · Mar 4, 2025
Mar 4, 2025
Feb 15, 2025
Feb 3, 2025
Apr 14, 2024
May 20, 2024
Feb 15, 2025
May 20, 2024
Feb 8, 2023
Nov 13, 2023
Nov 12, 2023
Sep 5, 2023

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