From 85b42b22f47d39cbcf869eecfe1b809c815d33f7 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Sun, 2 Jul 2017 13:41:07 -0700 Subject: [PATCH] define __fish_active_key_bindings before using it --- share/config.fish | 1 + share/functions/__fish_config_interactive.fish | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/share/config.fish b/share/config.fish index 58dcd8702..ef31aee3c 100644 --- a/share/config.fish +++ b/share/config.fish @@ -194,6 +194,7 @@ function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" - set local_path $x $local_path end end + set -xg PATH $local_path end diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 697a68276..5c191311d 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -10,6 +10,7 @@ function __fish_config_interactive -d "Initializations that should be performed end set -g __fish_config_interactive_done + set -g __fish_active_key_bindings # Set the correct configuration directory set -l configdir ~/.config @@ -185,16 +186,16 @@ function __fish_config_interactive -d "Initializations that should be performed # Reload key bindings when binding variable change function __fish_reload_key_bindings -d "Reload key bindings when binding variable change" --on-variable fish_key_bindings - # do nothing if the key bindings didn't actually change + # Do nothing if the key bindings didn't actually change. # This could be because the variable was set to the existing value - # or because it was a local variable - # If fish_key_bindings is empty on the first run, we still need to set the defaults + # or because it was a local variable. + # If fish_key_bindings is empty on the first run, we still need to set the defaults. if test "$fish_key_bindings" = "$__fish_active_key_bindings" -a -n "$fish_key_bindings" return end - # Check if fish_key_bindings is a valid function - # If not, either keep the previous bindings (if any) or revert to default - # Also print an error so the user knows + # Check if fish_key_bindings is a valid function. + # If not, either keep the previous bindings (if any) or revert to default. + # Also print an error so the user knows. if not functions -q "$fish_key_bindings" echo "There is no fish_key_bindings function called: '$fish_key_bindings'" >&2 # We need to see if this is a defined function, otherwise we'd be in an endless loop.