Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Damn I should've known that, I use $_ a lot. Commented Nov 22, 2023 at 3:25
  • Also, depending on your shell editing mode... if you've done set -o emacs then <ESC>. will bring the last word in. So ls <ESC>. I'm not sure there's an equivalent in vi mode, but I could be wrong. Commented Nov 22, 2023 at 3:42
  • are there any advantages or use cases where your 2nd option would be better? So do you mean for your emacs example that if I done ls <ESC> emacs would open with the ls output written in? Commented Nov 22, 2023 at 3:51
  • No, the <ESC>. is purely a command line "insert at this point the last word". It actually shows up as if you've typed the last word. It doesn't open an editor at all. Commented Nov 22, 2023 at 3:53
  • can you give an example please? Commented Nov 22, 2023 at 5:41