mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Break up $EDITOR before passing it to type to allow it to contain flags
More work on https://github.com/fish-shell/fish-shell/issues/541
This commit is contained in:
parent
debfc0f712
commit
5e9ca72731
@ -47,7 +47,12 @@ function funced --description 'Edit function definition'
|
|||||||
set init function $funcname\n\nend
|
set init function $funcname\n\nend
|
||||||
end
|
end
|
||||||
|
|
||||||
if not type -f "$editor[1]" >/dev/null
|
# Break editor up to get its first command (i.e. discard flags)
|
||||||
|
set -l editor_cmd
|
||||||
|
eval set editor_cmd $editor
|
||||||
|
if not type -f "$editor_cmd[1]" >/dev/null
|
||||||
|
_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor_cmd[1]' could not be found
|
||||||
|
"
|
||||||
set interactive 1
|
set interactive 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user