Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Fwd: Editing the history in the shell



On Sun, May 24, 2020 at 7:35 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Bart Schaefer wrote on Sat, 23 May 2020 14:30 -0700:
> > @@ -133,6 +140,28 @@ if ((fun)) then
> > +    for (( hist=1; hist <= savehist; hist++ )) print -rs -- "$var[hist]"
>
> This generates a syntax error when SHORT_LOOPS is unset.

I think zed has a long-standing problem with SH_WORD_SPLIT and
probably some other SH_ options?

% setopt shwordsplit
% zed "/tmp/one two"
Where does this go?
% cat "/tmp/one two"
cat: '/tmp/one two': No such file or directory
% cat /tmp/one
Where does this go?
%

So ... how far do we go to make "zed" compatible with nonstandard
options, and how do we approach doing it?  Try to use entirely
portable syntax, or invoke "emulate -L", or something in between?
Look at the handling of function names, too -- it creates the empty
function definition with ${(q-)1} but makes no attempt to quote $1
when calling "functions" or "autoload".



Messages sorted by: Reverse Date, Date, Thread, Author