I want to make a save command by editing the .bashrc

0

I found this script http://dotfiles.org/~jacqui/.bashrc.. 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?

Rho

Posted 2011-02-19T02:34:54.963

Reputation: 115

Answers

0

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.

Paused until further notice.

Posted 2011-02-19T02:34:54.963

Reputation: 86 075

I copy paste the file from the url to my ~/.bashrc file.. Don't know why it doesn't work.. – Rho – 2011-02-19T03:24:14.340

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 – Rho – 2011-02-19T03:26:59.983

@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? – Paused until further notice. – 2011-02-19T04:58:34.647