su command
when i type su command following error comes error is:"bash: __git_ps1: command not found". what is problem?
|
you need to source /etc/bash_completion.d/git in your .bashrc to be able to use __git_ps1
http://matthewtodd.org/2010/02/19/bundle-exec-bash.html |
Quote:
When does this error pop up. If you are getting it as soon as you switch user and every time you enter a command (i.e. a new prompt is shown) it will be because your PS1 variable is telling the shell '__git_ps1' to set the value of the prompt. I will hazard a guess (and it is very hazardous, given the sparsity of the information given) and say: Blank Whoever made changed the prompt (PS1) variable, did so in the global bashrc or profile, however bashcompletion isn't enable for all users and so the function isn't created when they log on. Simple way to fix it is to change the PS1 variable once you have switched users : Code:
export PS1="\u@\h:\w$ " |
All times are GMT -5. The time now is 02:16 PM. |