From b002eb350cad09689af998af2cacf3099aaf68ad Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Tue, 9 Apr 2019 00:29:22 -0700 Subject: [PATCH] Get rid of __fish_repaint_root it's identical to __fish_repaint - so just register that for both variable change events. --- share/functions/__fish_config_interactive.fish | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index a204b31d8..7b63c69d3 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -135,17 +135,10 @@ function __fish_config_interactive -d "Initializations that should be performed # # 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. # - function __fish_repaint --on-variable fish_color_cwd --description "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" + 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