Since when does "b" = "bash"?

i just ran /bin/bash --debugger, then “declare -F bash”, which says “bash 59 /etc/g/g”, and at line 59 i find a definition of a function named “b”, not “bash”.

i can’t see that’s it’s related, but also contained is the assignment “BARh=bash”

what’s going on? is “bash” somehow implicitly or explicitly defined as a function amongst /etc/profile files or some such?

Please check if, someone has dropped the following files into ‘/etc’ –

/etc/bash.bashrc.local
/etc/profile.local

Save local copies of –

/etc/bash.bashrc
/etc/profile

And then, due to the following –

 > rpm --query --whatprovides /etc/bash.bashrc
aaa_base-84.87+git20180409.04c9dae-150300.10.6.2.x86_64
 > 
 > rpm --query --whatprovides /etc/profile
aaa_base-84.87+git20180409.04c9dae-150300.10.6.2.x86_64
 >

– forcibly reinstall the package “aaa_base” to enforce the default bashrc and profile behaviour.


There shouldn’t be any other initialisation files which could change the default behaviour of Bash but, you could search everything in ‘/etc/bash_completion.d/’ and ‘/etc/profile.d/’ for a possible culprit.
You could also check the output of the Bash builtin command “alias”.

wow look at this:

$ [[ ]]  #fine first time
$ [[ ]]  #but second..
bash: syntax error near unexpected token `]]'

do you get that too?

Here on Leap 15.5 – default German language but, I have a British English test user –

 > su --login test002
Passwort: 
 > [[ ]]
-bash: syntax error near `]]'
 > locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
 >

Maybe, you could test further with a fresh, new, test user – simply use YaST to setup the new user and then login to the new, fresh, untouched, user …

BTW, I usually setup test users in a new group –

 > id
uid=59901(test002) gid=59998(test-user) groups=59998(test-user),491(cdrom)
 >