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

In connection with history, you can use !$ for the last argument, but you can also use escape-dot. I use that quite a bit (and escape-dot is slightly easier to type than !$).

Also worth pointing out that you can modify the command in the history list before running it, by typing !xxx:p (adding :p instead of !xxx that just re-runs the command). Then I use arrow-up and then modify it before running it.

https://henrikwarne.com/2018/08/11/my-favorite-command-line-...



Escape-dot has the benefits that (a) you immediately see what you’re getting and (b) you can repeat it to get the last argument of earlier commands.


Yes, (a) is good, and (b) I didn't know about - cool, and thanks!!




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

Search: