zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@sunsite.dk, 246305-submitter@bugs.debian.org
Subject: Re: Bug#246305: zsh: completion for sudo doesn't add commands under root's path
Date: Sat, 1 May 2004 01:42:41 -0400	[thread overview]
Message-ID: <20040501054241.GA11506@scowler.net> (raw)
In-Reply-To: <1040501052546.ZM1893@candle.brasslantern.com>

> So I'd suggest something like:
> 
>  local -a cmdpath
>  if zstyle -a ":completion:${curcontext}" command-path cmdpath &&
>     [[ $#cmdpath -gt 0 ]]

Okay, verbatim but for the comment.
BTW, I don't know if it's just me, but verizon.net is rejecting direct mail
to Bart.

Index: Completion/Zsh/Type/_command_names
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Type/_command_names,v
retrieving revision 1.6
diff -u -r1.6 _command_names
--- Completion/Zsh/Type/_command_names	3 Sep 2003 10:15:35 -0000	1.6
+++ Completion/Zsh/Type/_command_names	1 May 2004 05:40:32 -0000
@@ -33,4 +33,12 @@
 
 args=( "$@" )
 
+local -a cmdpath
+if zstyle -a ":completion:${curcontext}" command-path cmdpath &&
+   [[ $#cmdpath -gt 0 ]]
+then
+  local -a +h path
+  local -A +h commands
+  path=( $cmdpath )
+fi
 _alternative -O args "$defs[@]"
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.174
diff -u -r1.174 compsys.yo
--- Doc/Zsh/compsys.yo	29 Feb 2004 12:09:11 -0000	1.174
+++ Doc/Zsh/compsys.yo	1 May 2004 05:40:34 -0000
@@ -1140,6 +1140,11 @@
 care should be taken to specify only commands that take a short
 time to run, and in particular to avoid any that may never terminate.
 )
+kindex(command-path, completion style)
+item(tt(command-path))(
+This is a list of directories to search for commands to complete.  The
+default for this style is the value of the special parameter tt(path).
+)
 kindex(commands, completion style)
 item(tt(commands))(
 This is used by the function completing sub-commands for the system


  reply	other threads:[~2004-05-01  5:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <877jw0gzp3.wl@broken.int.wedontsleep.org>
2004-04-28 13:04 ` Clint Adams
2004-04-28 16:02   ` Bart Schaefer
2004-04-30 12:27     ` Clint Adams
2004-04-30 13:21       ` Oliver Kiddle
2004-04-30 15:39         ` Clint Adams
2004-04-30 16:25           ` Bart Schaefer
2004-05-01  5:02             ` Clint Adams
2004-05-01  5:25               ` Bart Schaefer
2004-05-01  5:42                 ` Clint Adams [this message]
2004-05-01 17:44                   ` [OT] Mail problems (was Re: Bug#246305 ...) Bart Schaefer

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=20040501054241.GA11506@scowler.net \
    --to=clint@zsh.org \
    --cc=246305-submitter@bugs.debian.org \
    --cc=schaefer@brasslantern.com \
    --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).