Subject: Re: (no subject)

From: Ivan Kozlov <[email-masked]>
Date: Sat, 29 Feb 2020 12:40:15 +0300

29.02.2020, 04:30, "Ivan Kozlov" <[email-masked]>:
>One further example: when complete-in-region-mode is active (again, _apparently_) and there is some text before the point, typing * (the asterisk character) runs some undocumented command which completes the argument if there is exactly one possible completion and doesn’t do anything otherwise, so it’s like TAB without the *Completions* buffer.
>
>So typing ls a<TAB>/* will produce ls a/b if b is the only file in a/, and ls a/ otherwise.
>
>This makes entering glob patterns (one of the most common tasks in shell) a *giant pain* with constantly hitting C-g and what not to make the completion stuff go away. I have no idea whether using * for the command was a deliberate decision, but it is really bad.
>
>Moreover, typing \ inserts \<TAB>! This one is inexplicable. It makes quoting characters a giant pain with constantly erasing the tab or cancelling the completion garbage as above.

I now realise what is actually going on here. Typing * and \ when completion-in-region-mode is active is exactly equivalent to activating this mode from a pattern ending in these characters.

In other words, a<TAB>* is equivalent to a*<TAB>, and a<TAB>\ is equivalent to a\<TAB>, which is actually supposed to allow escaping TAB.

Awful. The two cases should be treated completely differently.