Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.34 KB

README.md

File metadata and controls

62 lines (44 loc) · 1.34 KB

dev-shell-essentials

Alt demo

Requirements

  • python with json module (almost all linux distro has it preinstalled)

Installation

wget https://github.com/kepkin/dev-shell-essentials/archive/master.zip -O dev-shell-essentials.zip &&
  unzip dev-shell-essentials.zip &&
  cd dev-shell-essentials-master &&
  source dev-shell-essentials.sh &&
  cd -

Or using git

git clone https://github.com/kepkin/dev-shell-essentials.git
cd dev-shell-essentials
source dev-shell-essentials.sh

Optional steps

For ZSH users

Option 1

If you cloned this repository as it is to your home directory, run ...

echo "source ~/dev-shell-essentials/highlight.sh" >> ~/.zshrc

Otherwise, update the path.

Option 2

Add the following to your .zshrc file

function highlight() {
  declare -A fg_color_map
  fg_color_map[black]=30
  fg_color_map[red]=31
  fg_color_map[green]=32
  fg_color_map[yellow]=33
  fg_color_map[blue]=34
  fg_color_map[magenta]=35
  fg_color_map[cyan]=36
    
  fg_c=$(echo -e "\e[1;${fg_color_map[$1]}m")
  c_rs=$'\e[0m'
  sed -u s"/$2/$fg_c\0$c_rs/g"
}

Thanks @alexzanderr for this workaround