mirror of
https://gitlab.com/ceda_ei/wish
synced 2025-10-30 00:50:04 +01:00
Add wish_append. Change plugins to use it
This commit is contained in:
@@ -12,15 +12,5 @@ function wish_dummy_set_colors() {
|
||||
}
|
||||
|
||||
function wish_dummy_main() {
|
||||
if [[ $fg -eq -1 ]]; then
|
||||
local fg="\[\033[0;5;0m\]"
|
||||
else
|
||||
local fg="\[\033[38;5;${WISH_DUMMY_FG}m\]"
|
||||
fi
|
||||
if [[ $bg -eq -1 ]]; then
|
||||
local bg="\[\033[0;5;0m\]"
|
||||
else
|
||||
local bg="\[\033[48;5;${WISH_DUMMY_BG}m\]"
|
||||
fi
|
||||
PS1="$PS1$bg${fg}dummy"
|
||||
wish_append $WISH_DUMMY_BG $WISH_DUMMY_FG dummy
|
||||
}
|
||||
|
||||
@@ -7,9 +7,10 @@ function wish_newline_end() {
|
||||
}
|
||||
|
||||
function wish_newline_set_colors() {
|
||||
return
|
||||
WISH_NEWLINE_BG=-1
|
||||
WISH_NEWLINE_FG=-1
|
||||
}
|
||||
|
||||
function wish_newline_main() {
|
||||
PS1="$PS1\n"
|
||||
wish_append -1 -1 "\n"
|
||||
}
|
||||
|
||||
@@ -12,15 +12,5 @@ function wish_path_set_colors() {
|
||||
}
|
||||
|
||||
function wish_path_main() {
|
||||
if [[ $fg -eq -1 ]]; then
|
||||
local fg="\[\033[0;5;0m\]"
|
||||
else
|
||||
local fg="\[\033[38;5;${WISH_PATH_FG}m\]"
|
||||
fi
|
||||
if [[ $bg -eq -1 ]]; then
|
||||
local bg="\[\033[0;5;0m\]"
|
||||
else
|
||||
local bg="\[\033[48;5;${WISH_PATH_BG}m\]"
|
||||
fi
|
||||
PS1="$PS1$fg${bg} \w "
|
||||
wish_append $WISH_PATH_BG $WISH_PATH_FG " \w "
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user