Re:The future of documentation at Canonical (2021)
by xani_ on Monday September 19, 2022 @10:55AM
(#32899188)
Now time it, smartass
Now imagine you're 2 subcommands deep, smartass
Yes I know how readline works
Re:The future of documentation at Canonical (2021)
by susam on Tuesday September 20, 2022 @03:44AM
(#32908846)
Typing M-b to go back by one word to insert a new argument is of course going to be slower. It is going to be even slower when we are two sub-commands deep.
The M-b keybinding is merely a workaround, not a fix. I believe the snarky remark was unwarranted. I didn't mean to doubt your knowledge of readline. Like I said, I do agree with the larger point you made in your comment. I too find the non-standard help trends inconvenient. My comment was meant for sharing a workaround that helps me to alleviate some of the inconvenience caused by these problematic trends.
While I agree with the larger point of your comment, I work around this particular inconvenience of going back to the middle of the command by using the GNU Readline (or Zsh Line Editor in Zsh) key bindings. The key sequence to go back by one word and enter the new "help" argument is:
In the Emacs/GNU Readline notation the additional key sequence can be expressed as: That's 7 extra key presses which is exactly the same number of key presses it would take to type and append " --help" at the end of an existing command.