Turn on -o filenames in _tilde() only when it produces completions.
This commit is contained in:
parent
0042c06204
commit
e104424ff2
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user