zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
Cc: zsh-workers@sunsite.dk
Subject: Re: PATCH: Re: PATCH: update-alternatives completion
Date: Tue, 29 May 2001 10:19:31 -0400	[thread overview]
Message-ID: <20010529101931.A32458@dman.com> (raw)
In-Reply-To: <200105291308.PAA09291@beta.informatik.hu-berlin.de>; from wischnow@informatik.hu-berlin.de on Tue, May 29, 2001 at 03:08:18PM +0200

> Two possibilities, then (at least).  The large one (simplified):

Here goes.

Index: Completion/Debian/Command/_update-alternatives
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_update-alternatives,v
retrieving revision 1.2
diff -u -r1.2 _update-alternatives
--- Completion/Debian/Command/_update-alternatives	2001/05/29 12:39:31	1.2
+++ Completion/Debian/Command/_update-alternatives	2001/05/29 14:17:16
@@ -16,26 +16,39 @@
     '--display:name:_files -W /var/lib/dpkg/alternatives' \
     '--config:name:_files -W /var/lib/dpkg/alternatives' && return 0
 
-_call_function ret _update_alternatives_$state && return ret
+while true; do
 case "$state" in
 	islave)
+        _call_function ret _update_alternatives_$state && return ret
+	state=
 	_arguments -C '1:link:_files' \
                    '2:name:_files -W /var/lib/dpkg/alternatives' \
                    '3:path:_files' \
-                   '--slave:*::slave:->islave'
+                   '--slave:*::more:= ->islave' && return 0
+        [[ -z $state ]] && return 1
 	;;
+
 	install)
+        _call_function ret _update_alternatives_$state && return ret
 	_arguments -C '1:link:_files' \
                    '2:name:_files -W /var/lib/dpkg/alternatives' \
                    '3:path:_files' \
                    '4:priority:' \
-                   '--slave:*::slave:->islave' \
+                   '--slave:*::slave:= ->islave' && return 0
+        [[ -z $state ]] && return 1
 	;;
 
 	remove)
+        _call_function ret _update_alternatives_$state && return ret
 	_arguments \
                    '1:name:_files -W /var/lib/dpkg/alternatives' \
-                   '2:path:_files'
+                   '2:path:_files' && return 0
+        return 1
+	;;
+
+	*)
+	return 1
 	;;
 
 esac
+done


      reply	other threads:[~2001-05-29 14:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-28 19:05 Clint Adams
2001-05-29  7:25 ` Sven Wischnowsky
2001-05-29  7:31   ` Andrej Borsenkow
2001-05-29 12:34     ` Clint Adams
2001-05-29 14:28       ` Andrej Borsenkow
2001-05-29 12:32   ` PATCH: " Clint Adams
2001-05-29 13:08     ` Sven Wischnowsky
2001-05-29 14:19       ` Clint Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010529101931.A32458@dman.com \
    --to=clint@zsh.org \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).