make scp work with files with embedded spaces (grr...)
This commit is contained in:
parent
b414d1c5b7
commit
45f633b993
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# <![CDATA[
|
# <![CDATA[
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.84 2002/02/04 03:15:42 ianmacd Exp $
|
# $Id: bash_completion,v 1.85 2002/02/04 19:07:33 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -1131,8 +1131,8 @@ _scp()
|
|||||||
|
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
|
||||||
_known_hosts
|
[[ "$cur" == */* ]] || _known_hosts
|
||||||
COMPREPLY=( ${COMPREPLY[@]} $( compgen -f $cur ) )
|
_filedir
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -1711,12 +1711,12 @@ _filedir()
|
|||||||
local IFS cur
|
local IFS cur
|
||||||
|
|
||||||
IFS=$'\t\n'
|
IFS=$'\t\n'
|
||||||
COMPREPLY=()
|
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
|
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
|
||||||
COMPREPLY=( $( eval compgen -f $cur ) $( compgen -d $cur ) )
|
COMPREPLY=( ${COMPREPLY[@]} $( eval compgen -f $cur ) \
|
||||||
|
$( compgen -d $cur ) )
|
||||||
}
|
}
|
||||||
complete -F _filedir -o filenames cat less more ln strip
|
complete -F _filedir -o filenames cat less more ln strip
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user