diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2015-12-29 15:41:00 +0100 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2015-12-30 16:26:54 +0100 |
commit | 1a12071a48a4ead52c8749118aef2a1016bdc5e5 (patch) | |
tree | fa9a3f36f2475882d354de5517dbe51955c9e9ce /share/config.fish | |
parent | b7fb11cb7f8e05fecaf96ee93af285d8778d10c2 (diff) |
Immediately define command-not-found handler
This skips the weird dance where we'd define a simple handler and then
later overwrite with a fancier one, once the first event came in.
It turns out that isn't necessary, as it doesn't actually improve
startup speed because the checks needed to define fancier handlers are fast.
In case we are non-interactive, still define the simple handler, and
keep the default handler for users to switch to.
Diffstat (limited to 'share/config.fish')
-rw-r--r-- | share/config.fish | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/share/config.fish b/share/config.fish index f1bb0c0c..b1d404ee 100644 --- a/share/config.fish +++ b/share/config.fish @@ -19,10 +19,9 @@ end # # Hook up the default as the principal command_not_found handler -# for starting up since finding and executing a real one is not cheap -# This will be erased in __fish_command_not_found_setup once we're interactive +# in case we are not interactive # -function __fish_startup_command_not_found_handler --on-event fish_command_not_found +status -i; or function __fish_command_not_found_handler --on-event fish_command_not_found __fish_default_command_not_found_handler $argv end |