I have tried to install git-completion.bash on OSX using Terminal.
Process needed to edit ~/.bash_profile
as such.
I used vi ~/.bash_profile
. After this changes, when I open my Terminal I see -bash: 400:: command not found
and I'm not able to edit again!.
In addition to that, I have two different bash_profile in my home directory, .bash_profile.swo
& .bash_profile.swp
.
Can anyone please advise how can I resolve this issue?
Here is my .bash_profile
:
# Setting PATH for Python 3.4 # The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH # Setting PATH for Python 3.5 # The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH # added by Anaconda3 4.0.0 installer
export PATH="//anaconda/bin:$PATH" # added by Anaconda3 4.0.0 installer
export PATH="/anaconda/anaconda/bin:$PATH" # Setting PATH for Python 3.5 # The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH # added by Anaconda3 4.1.1 installer
export PATH="//anaconda/bin:$PATH" # Setting PATH for Python 3.5 # The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH # Setting PATH for Python 3.5 # The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH # Setting PATH for Python 3.5 # The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8 # added by Anaconda3 4.1.1 installer
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH" # Setting PATH for Python 3.6 # The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH # added by Anaconda3 4.3.1 installer
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH" # added by Anaconda3 4.3.1 installer
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH" # added by Anaconda3 4.4.0 installer
export PATH="/Users/shahramkarimi/anaconda/bin:$PATH" # added by Anaconda3 5.0.1 installer
export PATH="/Users/shahramkarimi/anaconda3/bin:$PATH" # Show always fullpath on terminal #export PS1='\u@\H:\w$ '
export PS1='\u \w$ '
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
The .bash_profile.swo
and .bash_profile.swp
files are simply temporary files created by Vim. The .swp
file was created when you opened .bash_profile
in the editor, and the .swo
was created when you edited .bash_profile
and .bash_profile.swp
already existed.
For the error, check your ~/.git-completion.bash
, ~/.profile
, and ~/etc/profile
files. Probably there's a line
400::
somewhere, and Bash interprets this as a command. You can check this via this command:
grep -H 400 ~/.git-completion.bash ~/.profile ~/etc/profile
(Post edited, thanks to @terdon for the suggestions.)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments