wip/shell_color
This commit is contained in:
parent
62a33a5583
commit
347951cbdf
1 changed files with 11 additions and 0 deletions
|
@ -1,5 +1,16 @@
|
|||
SH="$(cat /proc/$$/comm)"
|
||||
|
||||
shell_color() {
|
||||
local code="${1}"
|
||||
if [ -n "${code}" ]; then
|
||||
case "${SH}" in
|
||||
"bash") printf "\e[0;" ;;
|
||||
*) printf "\033[" ;;
|
||||
esac
|
||||
printf "%s" "${code}m"
|
||||
fi
|
||||
}
|
||||
|
||||
case "${SH}" in
|
||||
"bash")
|
||||
# completion
|
||||
|
|
Loading…
Reference in a new issue