Sample Header Ad - 728x90

Shortcut to delete command but keep arguments

1 vote
3 answers
1406 views
When working in terminal I often have sequences of commands like: cat long/path/to/file/xyz.file nano long/bath/to/file/xyz.file bash long/path/to/file/xyz.file etc Usually I hit control + A, right arrow a few times, backspace a few times, then write the new command. But during the ten seconds I am doing this, I always wonder if there is some magic shortcut that will do this for me. So my question is... **Is there a terminal shortcut to delete the command but keep arguments?** If not, is there a way to write your own shortcuts? The terminals I use most of the time are Ubuntu and OSX if that matters.
Asked by sudo rm -rf slash (163 rep)
Oct 2, 2017, 03:22 PM
Last activity: Apr 16, 2019, 02:55 PM