tenseleyflow/gump / fb39df9

Browse files

fix fish command_not_found event handler

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
fb39df9ee1d673ccf1616a87ab3118e93279d814
Parents
4604af2
Tree
91bb2f3

1 changed file

StatusFile+-
M src/cmd/init.rs 4 2
src/cmd/init.rsmodified
@@ -265,8 +265,10 @@ end
265265
 
266266
     // fish_command_not_found for no-prefix jumping
267267
     output.push_str(r#"
268
-# No-prefix directory jumping
269
-function fish_command_not_found
268
+# No-prefix directory jumping - must erase existing handler first
269
+functions -e fish_command_not_found
270
+
271
+function fish_command_not_found --on-event fish_command_not_found
270272
     # Check if it's a local directory first
271273
     if test -d "$argv[1]"
272274
         cd $argv[1]