Subject: Re: bug#70198: M-x shell: deal with environment variables present when tab expanding

From: Federico Tedin <[email-masked]>
Date: Wed, 10 Jul 2024 22:17:41 +0200

Eli Zaretskii <[email-masked]> writes:

> Something like
>   $ FOO='foo=bar' date

Ah right, that makes sense.

> It should, just not command completion.

> If we want to detect FOO=BAR, we need to use syntax classes, and I'm
> not sure regexps are the best instrument for that.

But then, just to make sure I'm on the right track:

- When the word at point is a command (not an arg)
`shell-command-completion' should return the proper command completions.

- When the word at point is *not* a command, `shell-command-completion' should
return nil so that other completion functions are attempted.

And these two scenarios need to be decided on using syntax classes
instead of regexps.