3

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.

1 Answer 1

1

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.

5
  • Hi, thanks for answer... I've already added like you say, and is not working if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi
    – Rodrigo
    Commented Jul 19, 2012 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. Commented Jul 19, 2012 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
    Commented Jul 19, 2012 at 13:35
  • Well, if you can't get inclusion to work, you can always place the alias commands directly inside ~/.bashrc. Commented Jul 20, 2012 at 13:54
  • I've try that too, but is not responding to that either. Any ideas ?
    – Rodrigo
    Commented Jul 24, 2012 at 18:26

You must log in to answer this question.

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