mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Support -h/--help with eval
`eval` prints help if given a single argument of -h or --help. Fixes #1379.
This commit is contained in:
parent
80859b8483
commit
9fc8729b96
1 changed files with 9 additions and 0 deletions
|
@ -1,4 +1,13 @@
|
|||
function eval -S -d "Evaluate parameters as a command"
|
||||
if not set -q argv[2]
|
||||
# like most builtins, we only check for -h/--help
|
||||
# if we only have a single argument
|
||||
switch "$argv[1]"
|
||||
case -h --help
|
||||
__fish_print_help eval
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
# If we are in an interactive shell, eval should enable full
|
||||
# job control since it should behave like the real code was
|
||||
|
|
Loading…
Reference in a new issue