zsh-users
 help / color / mirror / code / Atom feed
From: "Oliver Kiddle" <okiddle@yahoo.co.uk>
To: Rik <rik@pkl.net>
Cc: zsh-users@sunsite.dk
Subject: Re: Can someone help me convert compctl to zstyle, please.
Date: Tue, 5 Feb 2002 11:26:19 +0000 (GMT)	[thread overview]
Message-ID: <20020205112619.20191.qmail@web9301.mail.yahoo.com> (raw)
In-Reply-To: <20020205103802.GA3602@spoon.pkl.net>

Rik <rik@pkl.net> wrote:

> Sorry for the incredibly dumb-sounding question, but *where* would I
> do
> that?

Probably after compinit in your .zshrc. Or from the command-line if you
are just testing it.

> zsh sulked. If I changed the first line to "_sysctl () {" (tested on

Sorry, my mistake. I'm stuck on a windows PC and couldn't test what I
was writing. You do need the () in the function definition as you
spotted. Also, the call to the sysctl command would need to be changed
to output all the sysctl variables. I didn't look closely at your
compctl function which references $1. The new system uses special
variables like $PREFIX instead.

Ignore the _sysctl example I gave you and try something simpler like:
  _f() { compadd one two three } ; compdef _f f
If that works, then you're not missing anything fundamental.

You can get the latest _sysctl from:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/zsh/zsh/Completion/Unix/Command/_sysctl?rev=1.4

> >   zstyle ':completion:*:*:(ssh|scp):*:my-accounts' users-hosts \
> >     root@mail.mynetwork.com root@www.mynetwork.com
> 
> Hm. Not quite the same as I had before, but close enough. I had got
> used
> to a single tab though.

It's an area of the new completion system that needs some reworking.

> Hrm. Is there a way to remove the /etc/hosts
> from the lists of hostnames to try. I'm guessing it's something to do
> with the tag-order thing, but, uhm, again, it appears not to like me.

You could try setting the hosts style which if set prevents the
/etc/hosts lookup. You may need a fairly specific context if you want
to keep /etc/hosts in other contexts (probably use the same context as
for users-hosts above after chopping `:my-accounts' off the end).
Typing Ctrl-X,h is useful for working out the right context.

There might be another, perhaps better way using tag-order but I'm not
too sure of details without first getting to a UNIX box.

Oliver

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


  reply	other threads:[~2002-02-05 11:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05  3:18 Rik
2002-02-05 10:02 ` Oliver Kiddle
2002-02-05 10:38   ` Rik
2002-02-05 11:26     ` Oliver Kiddle [this message]
2002-02-05 15:12       ` Rik
2002-02-12 17:07         ` Reading .zprofile (Re: Can someone help me convert ...) Bart Schaefer
2002-02-12 21:25           ` Craig Van Tassle

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=20020205112619.20191.qmail@web9301.mail.yahoo.com \
    --to=okiddle@yahoo.co.uk \
    --cc=rik@pkl.net \
    --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).