summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-05-02 20:45:15 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-05-02 21:50:07 +0300
commit6df8c8e530c10c68b5b4a34c77f24c648ac02dbb (patch)
tree7a35a5584223831909eb61b8a90a41a6d98b41d8 /README
parent90b67bc976dccc655f7ba89714b6c1e5b1e5ddc5 (diff)
downloadbash-completion-6df8c8e530c10c68b5b4a34c77f24c648ac02dbb.tar.gz
docs: Update "simply sourcing" instructions to match new layout, check $PS1.
Diffstat (limited to 'README')
-rw-r--r--README7
1 files changed, 3 insertions, 4 deletions
diff --git a/README b/README
index b95e2f2c..52c4e1ea 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