Under Bash some behavior of Alt+d has been driving me crazy since years and I figured out that maybe it could be fixed with a setting.
If I'm at a terminal and issue a command like this:
...$ cat >> ~/notesSuperLongFilename.txt
and then if I want, say, to issue :
...$ scp ~/notesSuperLongFilename.txt
I'd like to get back the "cat >> ~/notesSuperLongFilename.txt" using Ctrl+p (previous line) and then do Ctrl+a and then Alt+d and Alt+d again so I'd have:
and then I'd be able to simply enter "scp" and then do a Ctrl+m (or hit Enter / Return).
However it doesn't work because after the first Alt+d I get:
...$ >> ~/notesSuperLongFilename.txt
(so far so good)
but after the second Alt+d I get:
So for some reason Alt+d deletes ">> ~/notesSuperLongFilename" at once instead of just deleting ">> ".
This has to be the single biggest time-waster that is driving me crazy with Linux / Bash since literally years.
So how can I fix this (arguably broken) behavior of Alt+d?
P.S: I don't know who's "responsible" for that Alt+d behavior: I don't know if it's the terminal or if it's the shell (Bash in my case).