#262764 some characters not allowed in alias names - no rationale

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
"Oskar Liljeblad"
Date:
2024-05-14 14:39:04 UTC
Severity:
normal
Tags:
#262764#5
Date:
2004-08-01 21:34:53 UTC
From:
To:
In bash versions pre 3.0 in debian it was allowed to put
characters like / in aliases. For example, I use these aliases:

alias /='cd /'
alias ../='cd ..'

Now I get these errors

bash: alias: /': invalid alias name
bash: alias: ../': invalid alias name

The changelog for bash says:

j.  Documented the characters not allowed to appear in an alias name.

However, there's no rationale for this change in the documentation.
I've skimmed over the changelog and I can't find any reason
(technical or not) for the change.

Regards,

Oskar Liljeblad (oskar@osk.mine.nu)

#262764#10
Date:
2004-08-02 00:29:35 UTC
From:
To:
Matthias Klose wrote:

Characters that would result in alias names that will never be expanded.
For instance, characters that must be quoted to remove their special
meaning may never appear in a word that can be alias expanded.

POSIX specifies the characters that may appear in an alias name, though
it allows other characters as an extension.  Other POSIX shells disallow
`/', for what that's worth.

I will have to go through my archives tomorrow to see what prompted this
change.  It's possible that `/' needs to be disallowed only in posix
mode.

Chet