Re: ksh: allow editing empty line with 'v' in vi-mode
"Andy Bradford" <[email protected]> 31 Jul 2026 08:51:14 -0600
| Newsgroups | gmane.os.openbsd.tech |
|---|---|
| Message-ID | <[email protected]> |
Thus said Johannes Thyssen Tishman on Fri, 31 Jul 2026 09:26:12 -0000: > This is only possible if HISTCONTROL doesn't include 'ignorespace' > (see my reply to Uwe). While I could simply remove that option and do > as you suggest, I think that allowing ^[v in empty lines *and* > ignoring white-space only commands is a valid use case. I didn't realize that HISTCONTROL impacted this. Thanks for pointing this out. I too think that it's a valid use case if it can be distinguished to be intentional by the user. My only concern is that it introduces another potential misbehavior or at least surprising behavior. If my terminal is already in command mode and I want to type a command beginning with v (like vacation, vi, vipw, view), will I accidentally get thrown into the vi editor, when what I really wanted was to just type one of those commands? Right now what happens is that I get a bell (visual or audio), letting me know that I'm not in edit mode. Or does the suggested patch imply that it would only enter vi mode upon receiving both ^[v in some duration of time, e.g. after 250ms if no v is observed after the ^[ do not permit the v to enter edit mode? Thanks, Andy