Re: history expansion
Erik Wybouw <[email protected]> Sun, 12 Jul 2026 12:05:07 +0200
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_A0563FD9-C69D-4E6B-AD31-1752E75E3D76 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I use it a lot (coming from tcsh where I developed the muscle memory for = it). ZLE (at least mine, but can=E2=80=99t immediately find the option) can = expand the line for you as you hit enter, requiring a second = confirmation enter to actually execute, so that helps, and I=E2=80=99ve = taken the habit of tab-expanding =E2=80=98!=E2=80=99 constructs myself = immediately as I type the line. ps: also unclear where that tab is coming from, as I have expand-history = only bound to ESC prefixed combinations. Kind regards, erik. =E2=80=94 Erik Wybouw > On 12 Jul 2026, at 10:57, Vincent Lefevre <[email protected]> wrote: >=20 > I'm wondering whether users use history expansion in practice, as it > does not seem to be very useful with the power of ZLE (I suppose that > one can do the same kind of things, with the advantage of seeing the > immediate effect). >=20 > It can have a surprising behavior. For instance, after "zsh -f": >=20 > qaa% echo "foo!" > dquote> >=20 > Note that bash does not have any issue here. But there is the same > behavior with the less common >=20 > echo "foo!!" >=20 > --=20 > Vincent Lef=C3=A8vre <[email protected]> - Web: = <https://www.vinc17.net/> > 100% accessible validated (X)HTML - Blog: = <https://www.vinc17.net/blog/> > Work: CR INRIA - computer arithmetic / Pascaline project (LIP, = ENS-Lyon) >=20 --Apple-Mail=_A0563FD9-C69D-4E6B-AD31-1752E75E3D76 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" = content=3D"text/html; charset=3Dutf-8"></head><body = style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; = line-break: after-white-space;">I use it a lot (coming from tcsh where I = developed the muscle memory for it).<div><br><div>ZLE (at least mine, = but can=E2=80=99t immediately find the option) can expand the line for = you as you hit enter, requiring a second confirmation enter to actually = execute, so that helps, and I=E2=80=99ve taken the habit of = tab-expanding =E2=80=98!=E2=80=99 constructs myself immediately as I = type the line.</div><div><br></div><div>ps: also unclear where that tab = is coming from, as I have expand-history only bound to ESC prefixed = combinations.</div><div><br></div><div>Kind regards, erik.<br = id=3D"lineBreakAtBeginningOfMessage"><div> =E2=80=94<div>Erik Wybouw<br><br><br></div> </div> <div><br><blockquote type=3D"cite"><div>On 12 Jul 2026, at 10:57, = Vincent Lefevre <[email protected]> wrote:</div><br = class=3D"Apple-interchange-newline"><div><div>I'm wondering whether = users use history expansion in practice, as it<br>does not seem to be = very useful with the power of ZLE (I suppose that<br>one can do the same = kind of things, with the advantage of seeing the<br>immediate = effect).<br><br>It can have a surprising behavior. For instance, after = "zsh -f":<br><br>qaa% echo "foo!"<br>dquote><br><br>Note that bash = does not have any issue here. But there is the same<br>behavior with the = less common<br><br> echo "foo!!"<br><br>-- <br>Vincent Lef=C3=A8vre = <[email protected]> - Web: = <https://www.vinc17.net/><br>100% accessible validated (X)HTML - = Blog: <https://www.vinc17.net/blog/><br>Work: CR INRIA - computer = arithmetic / Pascaline project (LIP, = ENS-Lyon)<br><br></div></div></blockquote></div><br></div></div></body></h= tml>= --Apple-Mail=_A0563FD9-C69D-4E6B-AD31-1752E75E3D76--