GNU bug report logs -
#77746
[PATCH] sh-mode: Fix incorrect word syntax for punctuation in sh-mode
Previous Next
Reported by: James Cherti <contact <at> jamescherti.com>
Date: Fri, 11 Apr 2025 14:56:02 UTC
Severity: normal
Tags: patch
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
On 2025-04-14 05:44, Andreas Schwab wrote:
> On Apr 14 2025, Visuwesh wrote:
>
>> [ஞாயிறு ஏப்ரல் 13, 2025] Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:
>>
>>>>> In sh and Bash, the characters !%^~:.,= and are not valid in variable or
>>>>> function names.
>>>
>>> I'm not positive about all of them, but at least some of those can
>>> appear in the names of commands.
>>
>> Not sure sh (and its million implementations) but bash definitely allows
>> %.
>
> Bash allows any WORD as a function name.
Yes, Bash permits the characters !%^~:.,= in function names.
However, it does not permit them in variable names. Try:
var!name=1
var%name=1
var^name=1
var:name=1
var.name=1
var,name=1
var=name=1
Sh, on the other hand, disallows the characters !%^~:.,= in function
and variable names in many implementations.
The primary reason I submitted this patch is to address the
inconvenience caused by Emacs including certain characters when
completing variable names.
--
James Cherti
GitHub: https://github.com/jamescherti
Website: https://www.jamescherti.com/
This bug report was last modified 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.