mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
35295: Try harder with zftp directory listing
This commit is contained in:
parent
d2f0b3ccb2
commit
9a6f55dc7a
2 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
2015-05-26 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Han Pingtian: 35295: Functions/Zftp/zfcd_match: be more
|
||||
inventive zftp directory listing.
|
||||
|
||||
* Eric Cook: 35292: Completion/Redhat/Command/_yum: complete
|
||||
installation of local files.
|
||||
|
||||
|
|
|
@ -25,7 +25,13 @@ if [[ $ZFTP_SYSTEM = UNIX* ]]; then
|
|||
fi
|
||||
# If we're using -F, we get away with using a directory
|
||||
# to list, but not a glob. Don't ask me why.
|
||||
reply=(${${(M)${(f)"$(zftp ls -lF $dir)"}:#d*}/(#b)*[[:space:]](*)\//$match[1]})
|
||||
reply=(${(M)${(f)"$(zftp ls -lF $dir)"}:#d([^[:space:]]##[[:space:]]##)(#c8)?##\/})
|
||||
|
||||
# If ls -lF doesn't work, try dir ...
|
||||
if ! (($#reply)); then
|
||||
reply=(${(M)${(f)"$(zftp dir $dir)"}:#d([^[:space:]]##[[:space:]]##)(#c8)?##})
|
||||
fi
|
||||
reply=(${reply/(#b)d([^[:space:]]##[[:space:]]##)(#c8)([^\/]##)\/#/$match[2]})
|
||||
# () {
|
||||
# zftp ls -LF $dir >|$1
|
||||
# reply=($(awk '/\/$/ { print substr($1, 1, length($1)-1) }' $1))
|
||||
|
|
Loading…
Reference in a new issue