- avoid double machine name bug in scp
This commit is contained in:
parent
98dee7dfa6
commit
0ce0956a81
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.421 2002/10/02 03:32:40 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.422 2002/10/05 07:52:37 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -1740,7 +1740,7 @@ _chkconfig()
|
||||
}
|
||||
[ "$have" ] && complete -F _chkconfig chkconfig
|
||||
|
||||
# This function orovides simple user@host completion
|
||||
# This function provides simple user@host completion
|
||||
#
|
||||
_user_at_host() {
|
||||
local cur
|
||||
@ -1900,7 +1900,7 @@ _scp()
|
||||
# default to home dir of specified user on remote host
|
||||
path=$( ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null)
|
||||
fi
|
||||
COMPREPLY=( $( compgen -P "$userhost:" \
|
||||
COMPREPLY=( $( compgen \
|
||||
-W "`echo $( ssh -o 'Batchmode yes' $userhost \
|
||||
compgen -f -- $path 2>/dev/null)`"))
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user