[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-114-ga0afe09
Ville Skyttä
ville.skytta at iki.fi
Sun Apr 24 17:23:43 UTC 2011
The following commit has been merged in the master branch:
commit e104424ff2be1b4c77a96c44d52750be5b1bede7
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Apr 24 20:09:02 2011 +0300
Turn on -o filenames in _tilde() only when it produces completions.
diff --git a/bash_completion b/bash_completion
index 5ed95dd..e550af8 100644
--- a/bash_completion
+++ b/bash_completion
@@ -852,10 +852,10 @@ _tilde()
{
local result=0
if [[ $1 == ~* && $1 != */* ]]; then
- compopt -o filenames 2>/dev/null
# Try generate ~username completions
COMPREPLY=( $( compgen -P '~' -u "${1#\~}" ) )
result=${#COMPREPLY[@]}
+ [ $result -gt 0 ] && compopt -o filenames 2>/dev/null
fi
return $result
}
--
bash-completion
More information about the Bash-completion-commits
mailing list