From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16216 invoked from network); 2 Oct 2020 14:47:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Oct 2020 14:47:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=IqHvIET7mHB99H+mvbXgXmzlu8kljoetRBTDD9qhL00=; b=V5X1hGvY1X2NglBZ8DK1KEOxkx HZWhf/P9OvcvNHTirNDZBW9in3MGpcSmG2/LZ+ERag/Fvg91L7vTIHFd0RkMqnxOSEbt+fNm6irhV ccJ3xCoAA5zRhw/i0ioWuUoDBJ088EW06blC4zSkAL6emOc8rMGWe9Ecn33jM8+E/fIH1irEFews/ O2Zd2HbjixF0THyq20lQmR3hWX21eJtqgzAEBQe2LwHzNla+zrp0ZmGZpzmocD3XUeCYfVIVQ5R2I 1W6p0bxnxwsCO7qp1pMJBLas8G/7JqiS8Q1lBzBhF2WtWBxXzDgtttdu0VUtvhGx7CQnqa0ODdXiU fwDEJaMA==; Received: from authenticated user by zero.zsh.org with local id 1kOMLU-000Pk1-L4; Fri, 02 Oct 2020 14:47:40 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1kOMLE-000Pay-Sx; Fri, 02 Oct 2020 14:47:25 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1kOMLD-000INB-CK; Fri, 02 Oct 2020 16:47:23 +0200 cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: To: Roman Perepelitsa Subject: Re: [BUG] _less incorrectly completes -" and -# MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <70618.1601650025.1@hydra> Date: Fri, 02 Oct 2020 16:47:23 +0200 Message-ID: <70628-1601650043.378616@hQ3l.BrEr.w3GB> X-Seq: 47420 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: 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