zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] complete two or more options for zsh
Date: Tue, 22 Sep 2015 22:39:02 -0700	[thread overview]
Message-ID: <150922223902.ZM30528@torch.brasslantern.com> (raw)
In-Reply-To: <B1BC25E1-B272-4FDB-93F2-2CC0887ABC7B@kba.biglobe.ne.jp>

On Sep 20,  4:27am, Jun T. wrote:
} Subject: [PATCH] complete two or more options for zsh
}
} % zsh -<TAB>
} 
} This offers zsh's options, but the following does not work:
} 
} % zsh -v -<TAB>
} 
} Here, -v can be any other option.

There's another problem, which is made worse by your change:  The
default thing to complete for "zsh <TAB>" is options rather than
script names.  Prior to your change, a side-effect was that script
names began to be completed as they should have been all along,
which is probably why nobody noticed before.  After your change,
script names are never offered unless you first type at least one
character that is not "-".

} The reason seems to be that all the optspecs generated by
}   _argument -- '*:'   (_sh: line 24)
} look like
}   -v[equivalent to --verbose]:   --aliases:   etc.
} i.e., a ':' is appended to their ends (so the option requires
} an argument).
} 
} This ':' is added by
}   cache+=( "${(@)^tmp}${descr}" )   (_arguments: line 282)
} where $descr is equal to ':', which comes from the helpspec '*:'
} passed to _arguments. 

Hm.  Is this a bug in _arguments rather than in the way that _sh
called _arguments?  That is, should descr ever be a single ":"?

(That _sh calls _arguments the way it does is already somewhat a
problem; _arguments doesn't behave well when it's not driving the
whole show.)


  reply	other threads:[~2015-09-23  5:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-19 19:27 Jun T.
2015-09-23  5:39 ` Bart Schaefer [this message]
2015-09-25 16:04   ` Jun T.
2015-09-25 17:03     ` Bart Schaefer
2015-09-30 16:03       ` Jun T.
2015-09-30 16:19         ` Bart Schaefer
2015-10-01 10:41           ` Jun T.

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=150922223902.ZM30528@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).