Fix funced error message when $VISUAL is set

This commit is contained in:
Juho Kuisma
2025-11-14 15:04:57 +02:00
committed by David Adam
parent ee94272eaf
commit 41387a6a3a

View File

@@ -39,7 +39,11 @@ function funced --description 'Edit function definition'
end
if not type -q -f "$editor[1]"
echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor[1]' could not be found") >&2
if set -q VISUAL
echo (_ "funced: The value for \$VISUAL '$editor' could not be used because the command '$editor[1]' could not be found") >&2
else
echo (_ "funced: The value for \$EDITOR '$editor' could not be used because the command '$editor[1]' could not be found") >&2
end
set editor fish
end