zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Completion services + xterm auto-margin revisited
Date: Thu, 22 Feb 2001 11:49:15 +0000	[thread overview]
Message-ID: <Tc0a8890c51e267e2e1@mailsweeper01.cambridgesiliconradio.com> (raw)

I just updated the zsh guide at http://sunsite.dk/zsh/Guide/ thanks to some
suggestions from Sven.  One of the new things that went in is some mention
of `services':

compdef mycmd=cmd

where completion for mycmd is supposed to behave as closely as possible to
that for cmd.

If I've got this right, this depends on the completion in question
implementing any command-specific behaviour using the parameter $service.
That would imply it's a good idea to alter some of the standard completions
to use $service instead of $words[1].  This was prompted in particular by
looking at _vars_eq --- if you do `compdef myexport=export', you probably
want export arguments, not typeset ones.

Is this correct?  It seems to work correctly in this case, and it's
probably an easy set of changes but I thought I'd better ask.

By the way, completion listing for `typeset -' seems to tickle a relative
of an ancient bug with xterm auto-margin: one of the possible descriptions
is exactly 80 characters, but doesn't cause wraparound since there's
nothing to follow, and redisplaying the command line happens one line too
high.  There was a sizeable discussion about this once, but I've forgotten
the punchline.  The new element here is that it only happens if the screen
needs scrolling --- if the cursor is at the top of the screen, it works
fine.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


             reply	other threads:[~2001-02-22 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-22 11:49 Peter Stephenson [this message]
2001-02-22 12:02 Sven Wischnowsky
2001-02-22 12:14 ` Peter Stephenson
2001-02-22 12:43 ` Andrej Borsenkow
2001-02-22 13:41   ` Geoff Wing
2001-02-22 13:01 Sven Wischnowsky
2001-02-22 13:02 Sven Wischnowsky

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=Tc0a8890c51e267e2e1@mailsweeper01.cambridgesiliconradio.com \
    --to=pws@csr.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).