mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
+ added xterm_color function to lib/termsupport.zsh
This commit is contained in:
parent
1120f97305
commit
bb7c309f2f
1 changed files with 6 additions and 0 deletions
|
|
@ -28,6 +28,12 @@ function omz_termsupport_preexec {
|
|||
title "$CMD" "%100>...>$2%<<"
|
||||
}
|
||||
|
||||
# Prints given 2nd argument with xterm color code of 1st argument
|
||||
# see http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html for color codes
|
||||
function xterm_color() {
|
||||
echo -e "\033[38;5;$1m$2\033[0m"
|
||||
}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook precmd omz_termsupport_precmd
|
||||
add-zsh-hook preexec omz_termsupport_preexec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue