News for hackers. Stuff that matters.
Re:Ffmpeg Buddy by paulmd on Wednesday June 01, 2022 @02:31PM (#31586112)
> One thing I hate about CLI tool though, is that it's very hard to edit long commands in terminal.

Apart from the "wrap it in a shell script" advice, I would also note that in a bash-like terminal, home and end will jump to the start or the end of the current command buffer, and ctrl-del (or alt-del maybe?) or ctrl-arrow keys usually delete or move the cursor a whole word at a time, which makes it somewhat quicker to work rather than sitting there holding an arrow key or backspce.

Many here probably already know this, some may not!

Re:Ffmpeg Buddy by thrdbndndn on Wednesday June 01, 2022 @03:12PM (#31586612)
Thanks, yeah I know these since I use them heavily in editor as well.

Now this got me thinking: the main problem with terminal is that it doesn't seem to support "cut" (and consequently, "paste to replace selection"). So re-arranging a command string is always gonna be a pain regardless the complexity.

I can see why it was this way historically, but not exactly sure why no modern terminal emulator gives this feature, even as optional.

Re:Ffmpeg Buddy by paulmd on Wednesday June 01, 2022 @04:57PM (#31588002)
one analogy might be the "cut and accumulate" feature in nano (and probably others) where a line is removed and appended to the clipboard, then you can paste and all those lines will be pasted off the clipboard at once. You could do that at a character level in the shell, if you wanted. No idea if any shells do though.
Re:Ffmpeg Buddy by wtch98 on Thursday June 02, 2022 @07:13AM (#31593543)
ctrl-a and ctrl-e to start/end of line