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

Better than that for me is "Alt+.", much easier to type. It can be also combined with number like "Alt+2+." will insert second argument. Similarly "Alt+0+." will insert last command. http://linuxcommando.blogspot.in/2009/05/more-on-inserting-a...


If you are on OS X and use Terminal.app “Alt-.” won’t work because Alt is used for alternate characters. You have two options: enable “use option as meta” in the app settings (but you lose the extra characters) or use “Esc-.” instead.

Yes, I know about iTerm. I don’t want it.


iTerm2 by chance? Carries a great deal of improvements over the original iTerm and is under active development.


One way or another, that's true of any terminal. The shell sees characters, not keystrokes.


In my bash/readline/whatever, Alt+<N>+. gives the Nth-from-the-end argument to the previous command. so,

    $ echo a b c d
    a b c d
    $ echo # pressing <Alt+<2>+.> here inserts 'c', not 'b'.




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

Search: