I just noted that I forgot another level of quoting that would be needed
for those rare cases of users having awkward characters in their path.

Also I've added { …; } around the first version (the 2nd already has "(…
)", yes the different forms are on purpose) and a "2> /dev/null to not
clutter up messages in case any errors occur)

Thus my first suggestion would need to read: 
"${FCEDIT:-"${EDITOR:-"$( { command -v editor || PATH=/usr/bin printf 
/usr/bin/vi; } 2> /dev/null )"}"}"

and the one that works around the aliases issue would need to read: 
"${FCEDIT:-"${EDITOR:-"$( (unalias -a ; command -v editor || PATH=/usr/bin 
printf /usr/bin/vi) 2> /dev/null )"}"}"




Cheers,
Chris.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to