mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
Make funced properly handle an invalid number of arguments
Fixes https://github.com/fish-shell/fish-shell/issues/780
This commit is contained in:
@@ -31,7 +31,7 @@ function funced --description 'Edit function definition'
|
||||
set -e argv[1]
|
||||
end
|
||||
|
||||
if begin; set -q funcname[2]; or not test "$funcname[1]"; end
|
||||
if test (count $funcname) -ne 1
|
||||
set_color red
|
||||
_ "funced: You must specify one function name
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user