$_
aluminumsulfate at earthlink.net
aluminumsulfate at earthlink.net
Tue Jan 9 16:26:13 EST 2007
> Date: Tue, 9 Jan 2007 09:43:27 -0500 (EST)
> From: "Steven W. Orr" <steveo at syslang.net>
> =>If y'all haven't tried $_ yet, you should definitely give it a spin!
>
> In terms of good practices, (assuming you're using bash) I prefer using !$
>
> !$ is the last argument of the last command. It's from the csh history
Using !$ has the advantage that bash shows you the expanded version of
the command you are executing. But !$ doesn't interact with tab
completion like $_ does. Try this:
$ ls -al /etc/sysctl.conf
$ less $_/<TAB>
...turns magically into...
$ less /etc/sysctl.conf
...and you can hit backspace...
$ less /etc/
...and fill in something eles
$ less /etc/asound.conf
In my commands, I've historically (ha ha) avoided ! like the plague
because - for me - it has more often than not lead to unexpected
results. Of course, taking the time to learn all the ! forms would
probably help with this! The idea of being able to access parameters
other than the last *does* appeal to me. It sure would be nice if !
forms could be expanded in-place and edited before the command was
issued.
More information about the gnhlug-discuss
mailing list