From 825a7311ea6769687e92ee336342216fc71f0037 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 8 Jun 2013 20:29:38 -0700 Subject: [PATCH] Make funced properly handle an invalid number of arguments Fixes https://github.com/fish-shell/fish-shell/issues/780 --- share/functions/funced.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/funced.fish b/share/functions/funced.fish index acee5c1a9..3c2de0614 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -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 "