Skip to content

Comment on Things you didn't know about GNU readline (2019)parent

Comments

I've always used !$ to get the last word of the previous command like so:

    mkdir -p foo/bar
    cd !$          # => cd foo/bar
I suppose the advantage of `ESC, .` is universality since it'd work inside any readline prompt? Not sure how frequently I actually need to do that outside of bash but going to keep it back of mind in case I do, thanks

I like the interactive nature of esc-., you can keep "up arrowing", to a value a few commands ago and crucially: edit the value. (add/remove `tgz`, etc)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.