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

Re: history expansion



On Sep 26, 12:12pm, Roman Neuhauser wrote:
} Subject: Re: history expansion
}
} > }     % !!:s/!!3/!-2:s,foo,bar,/
} 
} > There isn't any option or other setting that allows history expansions
} > to be nested in that way.
} 
}     not knowing the internals of the history expansion, what is the
}     probability of nested expansion appearing in zsh?

On Sep 26, 11:28am, Peter Stephenson wrote:
}
} It doesn't look *that* difficult, but it's not completely trivial (some
} of the state is currently kept in global variables) so it's a bit of
} work

In particular I'm concerned about the default (non-CSH_JUNKIE) history
behavior:

 By default, a history reference with no event designator refers to the
 same event as any preceding history reference on that command line; if
 it is the only history reference in a command, it refers to the previous
 command.

Within a nested expression, which references "precede" which others?  If yet
another history reference follows (in a separate word) a nested reference,
which of the subexpressions of the nested reference determines which event
is used by that second reference?

(If this thread continues, it should be moved to zsh-workers.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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