Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

Bugs in bash.bashrc

$
0
0
Using XFCE on openSUSE 13.1, my bash.bashrc has 2 bugs in it. Both of them are when a custom function/routine is the same name as an internal command.

1st bug is at line 57. This line:
Code:

path ()
Generates this error:
Code:

-bash: /etc/bash.bashrc: line 57: syntax error near unexpected token `('
-bash: /etc/bash.bashrc: line 57: `path ()'

There is nothing syntactically wrong with that line - bash just doesn't like creating a function with the same name as a built-in command. Doing a global search and replace that changes "path" to "ckpath" fixes the error.

Once that bug was fixed, this error appeared:

Code:

-bash: /etc/profile.d/alias.bash: line 12: syntax error near unexpected token `('
-bash: /etc/profile.d/alias.bash: line 12: `    remount () { /bin/mount -o remount,${1+"$@"} ; }'

Since there is a built-in remount command, and I never use remount anyway, I just commented out line 12 in /etc/profile.d/alias.bash

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>