[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-259-g21c5a0e

Ville Skyttä ville.skytta at iki.fi
Tue May 3 07:48:23 UTC 2011


The following commit has been merged in the master branch:
commit 6df8c8e530c10c68b5b4a34c77f24c648ac02dbb
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon May 2 20:45:15 2011 +0300

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

diff --git a/README b/README
index b95e2f2..52c4e1e 100644
--- a/README
+++ b/README
@@ -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

-- 
bash-completion



More information about the Bash-completion-commits mailing list