bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable


From: Chet Ramey
Subject: Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable
Date: Fri, 22 Aug 2008 18:53:39 -0400
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Francis Moreau wrote:
On 8/22/08, Chet Ramey <address@hidden> wrote:
Good catch.  The command executed is actually

fc -e "${VISUAL:-${EDITOR:-emacs}}"

It's the same command for vi and emacs editing modes, though the default
for vi editing mode is `vi' instead of `emacs'.  The documentation needs
to be updated, and has for a while, since it's been this way since at
least bash-2.05.  Seven years is a long time for this to go unnoticed.

hmm why not fixing the command instead ?

It's not broken.

VISUAL can be used to visualize a  file, so can be set to 'less' for
example. It shouldn't be used if you wand to edit.

That isn't the case.  In fact, it's exactly the opposite.

The historic use of VISUAL was for the user to set it to his preferred
`visual' (screen-oriented) editor (note the similarity to `vi') while
leaving EDITOR set to, most often, `ed'.  It can be set to `less', but
I'm not sure why you'd want to.

These days there's no practical difference between the two.

You might see what `man environ' on your system says.  A random Ubuntu
system I have access to reflects the usage as I've described it.

I think what is described in the man is fine. And I wanted to
customize FCEDIT to launch emacs in sh-mode, something I can't do with
current command setting.

I'll consider it as an enhancement request for a future version.  You
can, of course, set `VISUAL' to a command that starts emacs in the
desired mode.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]