mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
21086: fix module completion (broken in previous patch) and other tweaks
This commit is contained in:
parent
da3121ea10
commit
aac33a33a1
2 changed files with 10 additions and 4 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2005-04-03 Andrey Borzenkov <bor@zsh.org>
|
||||
|
||||
* 21086: Completion/Unix/Command/_rsync: fix module completion,
|
||||
redirect rsync errors to /dev/null, use -S "" as suggested
|
||||
by Oliver.
|
||||
|
||||
* 21085: Completion/Mandrake/Command/_urpmi: update for 10.2,
|
||||
add parsehdlist, use urpmq --list options to get media and
|
||||
package list
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ _rsync_user_or_host() {
|
|||
_wanted users expl "user" \
|
||||
_combination -s '[:@]' "${tag}" users-hosts users -q "$@" -
|
||||
else
|
||||
[[ $words[CURRENT] = rsync://* ]] || rsync='rsync:rsync: compadd -S/ rsync:/'
|
||||
[[ $words[CURRENT] = rsync://* ]] || rsync='rsync:rsync: compadd -S "" rsync://'
|
||||
_alternative \
|
||||
'users:user:_users -S @' \
|
||||
"hosts:host:_hosts -S '$suf'" \
|
||||
|
|
@ -26,7 +26,7 @@ local expl remfiles remdispf remdispd remmodules suf ret=1 tag=accounts
|
|||
|
||||
if compset -P '*::*/' || compset -P 'rsync://*/*/'; then
|
||||
|
||||
remfiles=(${${(f)"$(_call_program files rsync ${words[CURRENT]%/*}/)"}:#[ ]*})
|
||||
remfiles=(${${(f)"$(_call_program files rsync ${words[CURRENT]%/*}/ 2>/dev/null)"}:#([ ]|MOTD:)*})
|
||||
|
||||
remdispf=(${remfiles:#d*})
|
||||
remdispd=(${(M)remfiles:#d*})
|
||||
|
|
@ -41,11 +41,13 @@ elif compset -P 1 '*::' || compset -P 1 'rsync://*/'; then
|
|||
|
||||
local pat=${words[CURRENT]}
|
||||
|
||||
if [[ $pat = *:: ]]; then
|
||||
if [[ $pat = *::* ]]; then
|
||||
pat=${pat%::*}::
|
||||
else
|
||||
pat=${pat%/*}/
|
||||
fi
|
||||
|
||||
remfiles=(${${(f)"$(_call_program files rsync $pat)"}:#[ ]*})
|
||||
remfiles=(${${(f)"$(_call_program files rsync $pat 2>/dev/null)"}:#([ ]|MOTD:)*})
|
||||
|
||||
remmodules=(${remfiles/[ ]##/:})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue