Re: Inconsistency between fc and C-x C-e

2022-06-10 Thread Lawrence Velázquez
On Fri, Jun 10, 2022, at 10:19 AM, Chet Ramey wrote: > I didn't look at more than mailx, but the description there makes it clear > that $EDITOR needs to expand to a command name. `more' has similar wording > ("The name of the editor shall be taken from the environment variable > EDITOR.") and talk

Re: Inconsistency between fc and C-x C-e

2022-06-10 Thread Chet Ramey
On 6/9/22 11:57 PM, Lawrence Velázquez wrote: On Thu, Jun 9, 2022, at 8:37 PM, Luciano wrote: 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 interp

Re: Inconsistency between fc and C-x C-e

2022-06-10 Thread Chet Ramey
On 6/9/22 8:37 PM, Luciano wrote: 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 pr

Re: Inconsistency between fc and C-x C-e

2022-06-09 Thread Lawrence Velázquez
On Thu, Jun 9, 2022, at 8:37 PM, Luciano wrote: > 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. It does, insofar as it

Re: Inconsistency between fc and C-x C-e

2022-06-09 Thread Luciano
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 t

Re: Inconsistency between fc and C-x C-e

2022-06-09 Thread Chet Ramey
On 6/8/22 5:06 PM, Luciano wrote: Hi! I had the terrible idea to set my EDITOR variable to something too complex. I had to pass some options with whitespace to vim, so i decided to use `eval`. I managed to get something working, but the way the EDITOR variable is interpreted isn't consistent to p

Re: Inconsistency between fc and C-x C-e

2022-06-08 Thread Greg Wooledge
On Wed, Jun 08, 2022 at 06:06:51PM -0300, Luciano wrote: > I had the terrible idea to set my EDITOR variable to something too > complex. I had to pass some options with whitespace to vim, so i decided > to use `eval`. [...] You could create a wrapper script, put it in your $HOME/bin/ directory (an

Inconsistency between fc and C-x C-e

2022-06-08 Thread Luciano
Hi! I had the terrible idea to set my EDITOR variable to something too complex. I had to pass some options with whitespace to vim, so i decided to use `eval`. I managed to get something working, but the way the EDITOR variable is interpreted isn't consistent to provide an example, if one sets EDIT