From 92f4a009b3411dfa294d63591c7af85770727569 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Mon, 15 Apr 2019 12:49:24 -0700 Subject: [PATCH] __fish_config_interactive: disable file completions for builtins Calling `complete` once here is preferable to adding a bunch of 1 line files to be autoloaded. --- share/functions/__fish_config_interactive.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 7b63c69d3..67384da82 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -164,6 +164,11 @@ function __fish_config_interactive -d "Initializations that should be performed # complete -c [ --wraps test + # + # Only a few builtins take filenames; initialize the rest with no file completions + # + complete -c(builtin -n | string match -rv 'source|cd|exec|realpath') --no-files + # 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 # Make sure some key bindings are set