On Wed, Jun 08, 2022 at 05:49:52PM -0400, Greg Wooledge wrote:
>You could create a wrapper script, put it in your $HOME/bin/ directory
>(and make sure that's in PATH), and then set EDITOR to that wrapper.
>That should be much more reliable, especially if other programs also
>use $EDITOR (which they might).
Yes, I think that's the most reasonable thing to do, and I'm going to do
that. 

On Thu, Jun 09, 2022 at 11:40:26AM -0400, Chet Ramey wrote:
> The edit-and-execute-command key binding runs
> 
> fc -e "${VISUAL:-${EDITOR:-emacs}}"
> 
> [...] while the fc command without options runs (internally)
> 
> "${FCEDIT:-${EDITOR:-vi}}"
Well that explains it!  is there a reason why fc -e is used here for C-x C-e 
instead of just plain "${VISUAL:-${EDITOR:-emacs}}" ? 
By the way, git seems to interpret the EDITOR variable in a way
consistent with C-x C-e, while the pass program as I said seems to just
execute $EDITOR, like fc. I wonder if POSIX leaves room for interpretation 
here. 
Anyway, any sane person would probably just follow Greg's advice.
Saludos

Reply via email to