3 ms·
Or I just use this script which is much more intuitive and convenient.
by Kiro 7y ago
Or I just use this script which is much more intuitive and convenient.
- zeepzeep 7y agoBut only solves one use case. Why not learn how to do it for every other unix tool?
- Kiro 7y agoI don't see how this script prevents me from learning it. With that said, we're obviously in different ballparks when it comes to the terminal. I don't need to do anything fancy. cd, ls, mv and git are pretty much the only commands I ever use. For me, this script fits nicely into my workflow.
- kazinator 7y agoIn my other post, I got the readline method down to one control code. You type "mv name" and hit the assigned control character, which produces a second copy of the name that you can edit in place. It works with any command: mv, cp, ln, git mv ... The editing is in the same command line, resulting in a proper argument that is in the command line. It gets saved into your history, and can be pasted into a script.
- kelnos 7y agoBut it's... not? What if I want to use the same trick with 'cp'? Do I go and copy-paste my script, or maybe spend time to make it generic enough to handle both commands? That's not a good use of my time when the shell will do it for me, if only I'd spend a minute to learn.