dev-shell-essentials
dev-shell-essentials copied to clipboard
Does not work with zsh
can you add support for zsh specially with oh-my-zsh
I was going to write the same, the workaround for it that I found is copied / pasted the highlighting function in my zshrc. Then just reload: $ source ~/.zshrc And finally you can try: $ ls | hightlight green "Doc"
yes. i did the same. just copy the function into .zshrc. its more simpler than installing with oh-my-zsh
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"
}
works like a charm. because its has no dependencies.