Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found this script Basically this is a shortcut for cd-ing my file system..

I can type "save nm" where "nm" is any short name for the directory, like "blog" or "blg" Then whenever I want to go to nm I'll just use 'cd nm'

But it is not working out for me, I get this error every time I enter save:

bash: save: command not found
bash: parse_git_branch: command not found

So How can I make this command work?

share|improve this question

That means the function isn't being created or there is an error in your ~/.bashrc file like a missing or extra quote or curly brace.

Did you start a new shell or source ~/.bashrc from the current one so the changes take effect?

Try type -a save to see if it outputs a function definition.

Try grep -C 4 save ~/.bashrc to make sure there is something in that file that looks reasonable.

Load ~/.bashrc in an editor that does syntax highlighting and check very carefully to make sure that all quotes, brackets, braces and parentheses are balanced and that nothing is missing or doesn't belong.

If you still can't find the problem, post your file as an edit to your question or on a paste bin site and we can take a look at it.

share|improve this answer
I copy paste the file from the url to my ~/.bashrc file.. Don't know why it doesn't work.. – Raymond Go Ho Feb 19 '11 at 3:24
everytime i hit save, I get this error: -bash: =/home/ec2-user: No such file or directory -bash: =/var/www/html/helloZend: No such file or directory -bash: =/home/ec2-user: No such file or directory -bash: =/home/ec2-user: No such file or directory -bash: =/home/ec2-user: No such file or directory – Raymond Go Ho Feb 19 '11 at 3:26
@RaymondGoHo: There's no reference in that file to "/home/ec2-user". How exactly did you "copy paste"? What is in your ~/.dirs file? What happens when you try each of the steps I outlined in my answer? – Dennis Williamson Feb 19 '11 at 4:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .