From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: users@hosts completion
Date: Tue, 29 Jun 2004 09:40:42 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.60.0406271006450.19831@toltec.zanshin.com> (raw)
In-Reply-To: <20040627121512.GC22418@red-hots.cs.utk.edu>
On Sun, 27 Jun 2004, Chris Johnson wrote:
> How can I setup users-hosts completion for my specified commands?
Unfortunately you can't set this up with zstyles only, because it relies
on a special utility function called _combination which has to be called
in the correct way from the function that generates potential matches for
the command in question.
There's a generic function called _user_at_host that does this for the
special case of "user@hostname" arguments, but you still need another
function (which calls e.g. _arguments) to interpret the command line and
call _user_at_host when the cursor is in the correct argument position.
If it happens that your command has argument syntax very similar to one of
the commands that already uses users-hosts completion, then you can tell
the completion system to treat completion for your command exactly the
same as completion for that other command. You do that with a "compdef"
command like so:
compdef mynewcommand=telnet
Otherwise you'll have to delve into the writing of a new completion.
next prev parent reply other threads:[~2004-06-29 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-27 12:15 Chris Johnson
2004-06-29 16:40 ` Bart Schaefer [this message]
2004-06-29 21:39 ` Chris Johnson
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=Pine.LNX.4.60.0406271006450.19831@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@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).