Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
smackeyacky
· 2y ago · 0 comments
Not sure that would work everywhere but !$ definitely does for retrieving the last arg of the last command. 40 years of muscle memory right there
Comments
[–]
penguin_booze
2y ago
Alt + . is a readline binding, so that's available wherever GNU readline is used. Immediate examples that come to mind are Python PDB shell and GDB.
[–]
cassepipe
2y ago
And thus you get vim modes there too much if you set your .inputrc for it !
[–]
bierjunge
2y ago
Nobody mentions $_ ? It gives you the last argument used, so:
cat filename.txt grep "what I want" $_
expands "$_" to "filename.txt"