mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 23:22:46 +08:00
Get rid of __fish_repaint_root
it's identical to __fish_repaint - so just register that for both variable change events.
This commit is contained in:
parent
ef88e959ac
commit
b002eb350c
|
@ -135,17 +135,10 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
|
|
||||||
#
|
#
|
||||||
# This event handler makes sure the prompt is repainted when
|
# This event handler makes sure the prompt is repainted when
|
||||||
# fish_color_cwd changes value. Like all event handlers, it can't be
|
# fish_color_cwd{,_root} changes value. Like all event handlers, it can't be
|
||||||
# autoloaded.
|
# autoloaded.
|
||||||
#
|
#
|
||||||
function __fish_repaint --on-variable fish_color_cwd --description "Event handler, repaints the prompt when fish_color_cwd changes"
|
function __fish_repaint -v fish_color_cwd -v fish_color_cwd_root -d "Event handler, repaints the prompt when fish_color_cwd* changes"
|
||||||
if status --is-interactive
|
|
||||||
set -e __fish_prompt_cwd
|
|
||||||
commandline -f repaint 2>/dev/null
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function __fish_repaint_root --on-variable fish_color_cwd_root --description "Event handler, repaints the prompt when fish_color_cwd_root changes"
|
|
||||||
if status --is-interactive
|
if status --is-interactive
|
||||||
set -e __fish_prompt_cwd
|
set -e __fish_prompt_cwd
|
||||||
commandline -f repaint 2>/dev/null
|
commandline -f repaint 2>/dev/null
|
||||||
|
|
Loading…
Reference in New Issue
Block a user