zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Questions (and PATCH: small change to _complete)
Date: Thu, 25 Nov 1999 19:39:53 +0000	[thread overview]
Message-ID: <991125193953.ZM7636@candle.brasslantern.com> (raw)
In-Reply-To: <199911250954.KAA03611@beta.informatik.hu-berlin.de>

On Nov 25, 10:54am, Sven Wischnowsky wrote:
} Subject: Re: Questions (and PATCH: small change to _complete)
}
} I wrote:
} 
} > When completing in command position, _normal appends `-complete-' to
} > the context name (e.g. `:complete:-command-'). This is fine. When
} > completing arguments of commands, however, it only appends the command 
} > name (e.g. `:complete:dvips'). I'm a bit worried that someday we will
} > find out that we have used a tag name that is also the name of a
} > command and then it's non-trivial to write a compstyle-pattern that
} > correctly matches only the command name.
} 
} Ouch ;-) There was already the cvs tag.
} 
} For now this patch makes command names be preceded and followed by two
} colons. I.e. to unambiguously match the command name you can now do
} `*::cvs:*' and to test for a command/tag combination: `*::command:*:tag'.

This only solves the problem in one direction, doesn't it?  That is, now
you can tell that tag is not a command name, but how do you tell that a
command name is not a tag?

What I mean is, if testing "*:cvs:*" to find the cvs tag, but the context
is "...::cvs::..." because the command name is "cvs", then the tag branch
is going to be taken because "*:cvs:*" matches both "::cvs::" and ":cvs:".
It's a pain to have to test "*[^:]:cvs:*" just to be sure, especially
since that won't match if "cvs" is the first thing in the context (or is
that impossible for a tag name?).
 
} And I forgot to say that before the next release we should make sure
} that we set up good defaults for styles and probably improve the
} default _sort_tags. But I think this should really be done at the end.

I still need some good examples of styles.  As I mentioned before, I'd
never done much with compconf, so I didn't have anything for the "new"
compconf to convert into styles.  Consequently, I'm now back almost to
the bottom of the learning curve in understanding exactly what I can or
might want to do, and how.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~1999-11-25 19:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-25  9:54 Sven Wischnowsky
1999-11-25 19:39 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-11-30  8:35 Sven Wischnowsky
1999-11-30  9:34 ` Bart Schaefer
1999-11-24 10:44 Sven Wischnowsky
1999-11-26  8:46 ` PATCHlet: was: " Sven Wischnowsky
1999-11-26  8:51   ` Sven Wischnowsky
1999-11-26 22:08 ` Peter Stephenson
1999-11-29  9:27   ` Sven Wischnowsky
1999-11-29 17:23     ` 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=991125193953.ZM7636@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.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).