docs: Update "simply sourcing" instructions to match new layout, check $PS1.

This commit is contained in:
Ville Skyttä 2011-05-02 20:45:15 +03:00
parent 90b67bc976
commit 6df8c8e530

7
README
View File

@ -8,9 +8,8 @@ from either /etc/bashrc or ~/.bashrc (or any other file sourcing those). You
can do this by simply using:
# Use bash-completion, if available
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
[[ $PS1 && -f /usr/share/bash-completion/bash-completion ]] && \
. /usr/share/bash-completion/bash-completion
(if you happen to have *only* bash >= 4.1 installed, see further if not)
@ -31,7 +30,7 @@ can source the $sysconfdir/profile.d/bash_completion.sh script in
/etc/bashrc or ~/.bashrc.
If you're using MacOS X, /etc/bashrc is apparently not sourced at all.
In that case, you should put the bash_completion file in /sw/etc and add
In that case, you can put the bash_completion file in /sw/etc and add
the following code to ~/.bash_profile:
if [ -f /sw/etc/bash_completion ]; then