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'm having an odd problem with the .bashrc file.

I've added the following line so git could show me the current branch on prompt (I saw this tip here)

#Show branch in status line
PS1='[\W$(__git_ps1 " (%s)")]\$ ' export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"'

But it doesn't work. Also, I can't add my own aliases, if I add some to .bashrc_aliases it doesn't seem to read them.

share|improve this question
add comment

1 Answer

With regards to .bashrc_aliases, you need to include that file in your main .bashrc after you create it. You could add the following lines in the end of your ~/.bashrc:

if [ -f ./.bashrc_aliases ]; then
    . ./.bashrc_aliases
fi

After that, you either need to logout and back in again, for the changes to take effect, or you can run source ~/.bashrc.

share|improve this answer
    
Hi, thanks for answer... I've already added like you say, and is not working if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi –  Rodrigo Jul 19 '12 at 13:18
    
Maybe you have some naming mismatch in your files. In your question you write that you created .baschr_aliases (small typo there?) and in your comment above you write that you included ~/.bash_aliases. –  Marios Zindilis Jul 19 '12 at 13:28
    
Sorry, it was a typo in here, but in the baschr file is everything fine. I don't know what's the problem –  Rodrigo Jul 19 '12 at 13:35
    
Well, if you can't get inclusion to work, you can always place the alias commands directly inside ~/.bashrc. –  Marios Zindilis Jul 20 '12 at 13:54
    
I've try that too, but is not responding to that either. Any ideas ? –  Rodrigo Jul 24 '12 at 18:26
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.