mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 03:01:15 -03:00
remove trialing spaces #2
This commit is contained in:
@@ -14,22 +14,22 @@ function funced --description "Edit function definition"
|
||||
case '*'
|
||||
set -l init ''
|
||||
set -l tmp
|
||||
|
||||
|
||||
# Shadow IFS here to avoid array splitting in command substitution
|
||||
set -l IFS
|
||||
set -l IFS
|
||||
if functions -q $argv
|
||||
set init (functions $argv | fish_indent --no-indent)
|
||||
else
|
||||
set init function $argv\nend
|
||||
end
|
||||
|
||||
|
||||
|
||||
set -l prompt 'printf "%s%s%s> " (set_color green) '$argv' (set_color normal)'
|
||||
# Unshadow IFS since the fish_title breaks otherwise
|
||||
set -e IFS
|
||||
if read -p $prompt -c "$init" -s cmd
|
||||
# Shadow IFS _again_ to avoid array splitting in command substitution
|
||||
set -l IFS
|
||||
set -l IFS
|
||||
eval (echo -n $cmd | fish_indent)
|
||||
end
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user