- minor mount completion fix

This commit is contained in:
ianmacd 2003-06-02 00:41:33 +00:00
parent 4b998db340
commit af0237533a

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b
#
# $Id: bash_completion,v 1.573 2003/06/01 20:44:41 ianmacd Exp $
# $Id: bash_completion,v 1.574 2003/06/02 02:41:33 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -512,7 +512,7 @@ _mount()
elif [[ "$cur" == //* ]]; then
host=${cur#//}
host=${host%%/*}
if [ -n $host ]; then
if [ -n "$host" ]; then
COMPREPLY=( $( compgen -W "$( echo $( smbclient -d 0 -NL $host |
sed -ne '/^['$'\t '']*Sharename/,/^$/p' |
sed -ne '3,$s|^[^A-Za-z]*\([^'$'\t '']*\).*$|//'$host'/\1|p' ) )" -- "$cur" ) )