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

Re: history expansion bug?



On Oct 14,  5:54pm, Roman Neuhauser wrote:
} Subject: Re: history expansion bug?
}
}     aha. those ampersands substitute the pattern. i'm now looking for a
}     way to disable it: backslashing them doesn't seem to have any
}     effect.

Double the backslashes:

schaefer[524] echo foo
foo
schaefer[525] ^echo^print foo \\&\\& bar
print foo && bar foo
foo
zsh: command not found: bar

This is a bug, sort of ... ^x^y is rewritten as !!:s^x^y and re-evaluated,
which causes an extra level of history-backslashes to be stripped.

-- 
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