zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] _less incorrectly completes -" and -#
Date: Fri, 02 Oct 2020 16:47:23 +0200	[thread overview]
Message-ID: <70628-1601650043.378616@hQ3l.BrEr.w3GB> (raw)
In-Reply-To: <CAN=4vMoTixQ=XXhos8D92FwMOD3YS0NuLt7Y1aBMWyA8Kcn3rQ@mail.gmail.com>

Roman Perepelitsa wrote:
> Completing `less -` offers `-"` as a candidate. Accepting it literally
> inserts `-"`. I think it should offer `-\"` and insert the same.
>
> My naive patch (posted below) fixes this issue but not completely.

It also breaks them for the case where the user has specified an initial
single or double quote.

The real problem is that from inside _arguments, the -Q option gets
passed to compadd. Removing it is a fairly easy change. But I wish I
knew why it was used in the first place. Maybe we should just do that
and worry later about fixing any problems it creates afterwards.

It really seems ugly to be quoting any options in the _arguments
specifications other than those that are special to _arguments itself (=
: [ and +)

Oliver


  reply	other threads:[~2020-10-02 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 12:11 Roman Perepelitsa
2020-10-02 14:47 ` Oliver Kiddle [this message]
2020-10-07  0:44   ` Bart Schaefer
2021-10-23  0:26   ` Oliver Kiddle
2022-02-21 13:36     ` 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=70628-1601650043.378616@hQ3l.BrEr.w3GB \
    --to=opk@zsh.org \
    --cc=roman.perepelitsa@gmail.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).