From d374f2b1800d54d37a8e4c5299e824874a0489ed Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 9 Dec 2011 22:39:08 +0000 Subject: 29918: Completion: Add new _remote_files() helper and use it to reduce code duplication. --- Completion/Unix/Command/_git | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 4a830f281..702afe0e9 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5444,39 +5444,6 @@ __git_tree_files () { # Repository Argument Types -# _remote_files -_remote_files_git () { - # FIXME: these should be imported from _ssh - # TODO: this should take -/ to only get directories - # There should be coloring based on all the different ls -F classifiers. - local expl rempat remfiles remdispf remdispd args suf ret=1 - - if zstyle -T ":completion:${curcontext}:files" remote-access; then - zparseopts -D -E -a args p: 1 2 4 6 F: - if [[ -z $QIPREFIX ]] - then rempat="${PREFIX%%[^./][^/]#}\*" - else rempat="${(q)PREFIX%%[^./][^/]#}\*" - fi - remfiles=(${(M)${(f)"$(_call_program files ssh $args -a -x ${IPREFIX%:} ls -d1FL "$rempat" 2>/dev/null)"}%%[^/]#(|/)}) - compset -P '*/' - compset -S '/*' || suf='remote file' - - remdispd=(${(M)remfiles:#*/}) - - _tags files - while _tags; do - while _next_label files expl ${suf:-remote directory}; do - compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \ - ${(q)remdispd%/} && ret=0 - done - (( ret )) || return 0 - done - return ret - else - _message -e remote-files 'remote file' - fi -} - (( $+functions[__git_remote_repositories] )) || __git_remote_repositories () { local service @@ -5484,7 +5451,7 @@ __git_remote_repositories () { service= _ssh if compset -P '*:'; then - _remote_files_git + _remote_files --no-files -- ssh else _ssh_hosts -S: fi -- cgit v1.2.3 From 02dc5c681e1661b00761a6a98df9a85cfa82bae0 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 13 Dec 2011 19:28:19 +0000 Subject: 29998: _git: fix a typo (--rerbose). --- ChangeLog | 6 +++++- Completion/Unix/Command/_git | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 808531c23..d3403a23b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-12-13 Mikael Magnusson + + * 29998: Completion/Unix/Command/_git: fix a typo (--rerbose). + 2011-12-13 Barton E. Schaefer * 30020: Functions/Prompts/promptinit: prevent prompt_opts and @@ -15746,5 +15750,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5538 $ +* $Revision: 1.5539 $ ***************************************************** diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 702afe0e9..8a48c04b7 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -2619,7 +2619,7 @@ _git-pack-refs () { _git-prune () { _arguments -S \ '(-n --dry-run)'{-n,--dry-run}'[do not remove anything; just report what would be removed]' \ - '(-v --verbose)'{-v,--rerbose}'[report all removed objects]' \ + '(-v --verbose)'{-v,--verbose}'[report all removed objects]' \ '--expire[only expire loose objects older than given date]: :__git_datetimes' \ '*:: :__git_heads' } -- cgit v1.2.3