Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[BUG] _less incorrectly completes -" and -#
- X-seq: zsh-workers 47416
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [BUG] _less incorrectly completes -" and -#
- Date: Thu, 1 Oct 2020 14:11:58 +0200
- Archived-at: <https://zsh.org/workers/47416>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-10/CAN%3D4vMoTixQ%3DXXhos8D92FwMOD3YS0NuLt7Y1aBMWyA8Kcn3rQ%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-io1-f44.google.com) smtp.remote-ip=209.85.166.44; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=qUxaTkJbQyW67j/3Gp3ALUJ8fb+YvAUZrlzKVJx6k1Y=; b=rTSdpkdSRLxgWqDkyg0sXf08plheazg/xMRO93w4OZBtSQACkd3dw1ooNT5xU9Bg6R 5vIHB2SB69sp0wbTOpznr31tcMY6rp8Imf/i25ACWTJ8PDhtyJFhLGhZcgGUJSVBBwiA 1E2mu2+BhYjW3eL8PmB02OXLw05FVa0n/rZa3+yMdownn6R3Ks413DYZdfeBBLwgyG5u qCp+UauPmR3GYbIrePU+KouemdLPjF3tOhoEYTTJkhaliKWNJ0JPiwqZXGX4kXgKE6N8 q8keUovIuyCRoOER395qqdGUKaIpjQ8kkZG2lA0SW5fROjICpE367g3EaHJQaD7wa0oM QJvQ==
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- Sender: zsh-workers-request@xxxxxxx
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.
Unexpected behavior with the patch:
- Completing `less -\" x -` doesn't list any flags.
- Completing `less --quote=x -` lists `-\"`.
I was unable to fix these.
Roman.
P.S.
`-#` has the same issue.
---
diff --git a/Completion/Unix/Command/_less b/Completion/Unix/Command/_less
index cb71314a6..cdb3c0e56 100644
--- a/Completion/Unix/Command/_less
+++ b/Completion/Unix/Command/_less
@@ -80,7 +80,7 @@ _arguments -S -s -A "[-+]*" \
'--no-keypad[disable use of keypad terminal init string]' \
'(-y --max-forw-scroll)'{-y,--max-forw-scroll}'[specify forward scroll limit]' \
'(-z --window)'{-z+,--window=}'[specify scrolling window size]:lines' \
- '(-\" --quotes)'{-\"+,--quotes=}'[change quoting character]:quoting characters' \
+ '(-\" --quotes)'{-\\\\\"+,--quotes=}'[change quoting character]:quoting characters' \
'(-~ --tilde)'{-~,--tilde}"[don't display tildes after end of file]" \
'(-\# --shift)'{-\#+,--shift=}"[specify amount to move when scrolling horizontally]:number" \
'--follow-name[the F command changes file if the input file is renamed]' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author