Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: