Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've created a custom function in my .profile, and I've added right at the bottom, after my custom aliases :

# custom functions
function eclipse-gtk {
       cd ~/development/eclipse-juno
       ./eclipse_wb.sh &
       cd -
}

The function starts a custom version of my eclipse.

After I've added it, because I didn't wanted to log-out/log-in, I've reloaded my profile with the command:

. ~/.profile

and then I've tested my function by calling eclipse-gtk and it worked without any issue.

Today when I booted, I couldn't log in. After providing my password, in a few seconds I was back at the log-in screen. Dropping to command line using CTR + ALT + F1, I've commented out the function in my .profile and the log-in was possible without any issue.

My question is, what did I do wrong when I wrote the function? And if there is something wrong, why did it work yesterday after reloading the profile.

Thanks in advance.

Using: Ubuntu 12.04

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I managed to find the problem. The syntax of the function name was wrong. Apparently I can't use "-" char in the function name.

Here is the new function which is working and I can login without any issues:

# custom functions
eclipsegtk() 
{
        cd ~/development/eclipse-juno
        ./eclipse_wb.sh &
        cd -
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.