From ab94a397c345a1264269971041b06157765c237a Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Tue, 15 Jan 2008 08:58:28 +1000 Subject: Drop minor typo, add a few code comments darcs-hash:20080114225828-75c98-f67f17d7f3148b0bcc74ea53536d52da80667e55.gz --- share/functions/__fish_config_interactive.fish | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 82764535..66f237e6 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -195,24 +195,29 @@ function __fish_config_interactive -d "Initializations that should be performed complete -x -p "/etc/init.d/*" -a restart --description 'Stop and then start service' complete -x -p "/etc/init.d/*" -a reload --description 'Reload service configuration' + # Make sure some key bindings are set if not set -q fish_key_bindings set -U fish_key_bindings fish_default_key_bindings end - eval $fish_key_bindings ^/dev/null - + # Reload keybindings when binding variable change function __fish_reload_key_bindings -d "Reload keybindings when binding variable change" --on-variable fish_key_bindings eval $fish_key_bindings ^/dev/null end + # Load keybindings + __fish_reload_keybindings + + # Repaint screen when window changes size function __fish_winch_handler --on-signal winch commandline -f repaint end - if test -f /usr/lib/command-not-found $argv + # If the ubuntu command-not-found package can be found, add a handler for it + if test -f /usr/lib/command-not-found function fish_command_not_found_handler --on-event fish_command_not_found /usr/lib/command-not-found $argv - end + end end end -- cgit v1.2.3