home | list info | list archive | date index | thread index

[OCLUG-Tech] acceptable bourne shell function names

Greetings,

I'm having an odd issue with my bash config. In it I'm defining functions like

git-dirstatus()
{
    do some work
}

Sourcing this in my .bashrc works fine in a shell, but if I source my .bashrc
from my .xsession file during X login, I get a login failure, with a complaint
about the function name in my .xsession-errors file.

If I use underscores instead of the dash

ie.
git_dirstatus()

then it works in both.

I've tried an .xsession with

#!/bin/sh
#!/bin/bash

neither seems to make a difference. I have no idea why this situation would be
different just on X login.

Any ideas?

Thanks,
Mike
-- 
Michael P. Soulier <msoulier [ at ] digitaltorque [ dot ] ca>
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein

Attachment: signature.asc
Description: Digital signature