diff --git a/share/functions/funced.fish b/share/functions/funced.fish index 401b85276..602c7b82e 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -46,13 +46,11 @@ function funced --description 'Edit function definition' end # Break editor up to get its first command (i.e. discard flags) - if test -n "$editor" - set -l editor_cmd - eval set editor_cmd $editor - if not type -q -f "$editor_cmd[1]" - echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor_cmd[1]' could not be found") - set editor fish - end + set -l editor_cmd + eval set editor_cmd $editor + if not type -q -f "$editor_cmd[1]" + echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor_cmd[1]' could not be found") + set editor fish end if test "$editor" = fish