Make ! a builtin too, fixing "! -h"

UnLike other aliases (":.["), ! is special in the grammar but in the
few cases like "! -h" where we parse it as decorated statement they
are equals. Add it to the built in list, so the help argument works.

It can still be overridden, so this should not break anything.
This commit is contained in:
Johannes Altmanninger
2025-01-14 09:19:01 +01:00
parent 373bb56441
commit 6d18f57e96
4 changed files with 20 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
function __fish_print_help --description "Print help message for the specified fish function or builtin" --argument-names item error_message
switch $item
case !
set item not
case .
set item source
case :