Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: history-beginning-search-menu fails for pipes
- X-seq: zsh-workers 39884
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: history-beginning-search-menu fails for pipes
- Date: Wed, 09 Nov 2016 00:55:27 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1478679494; bh=XZHJJADb7rCzitDSfIR5+QeEl8TTkCOObUiWuVZ6fZM=; h=From:To:Subject:Date:From:Subject; b=HMYu5U0d0d9xmnDLGtiV56NKBpthqGxZ7CnPBZ6K09Gjn9qUfmJUUlSbhjBtYmnLFmEBo6DOxrJbw7V+qEFApLSI7k64Sv8IteRMKaRb5Zfncq2p/kuzI2L3XLUqEQY681x4q9P2XMChZxcn662kKqzH3k3AMkv8BpG4Q6dopR9CSEBXAzej24hk9Fwqp65KndXqompG3BJpn+YevgKevfqpk59v1a3T19S+ONNLKUPPviGGEozNVCZgwiyKj9V641LNTnOJH2UQ1F+1BhwyZf9/f7aHdiOXiv/nChn5ugCZ1BU5GT3ApjAnJVIKkB6McdJGfHlhRVfr0/I39LLwvw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
When searching for something else, I found a forum post from someone
complaining that history-beginning-search-menu doesn't work for
pipes. I can't find the post again now but anyway, it looks like |
is missing from the characters the function quotes.
Oliver
diff --git a/Functions/Zle/history-beginning-search-menu b/Functions/Zle/history-beginning-search-menu
index 1055181..0e1bbc7 100644
--- a/Functions/Zle/history-beginning-search-menu
+++ b/Functions/Zle/history-beginning-search-menu
@@ -112,7 +112,7 @@ fi
# go to the last one. This allows accept-line-and-down-history etc.
# to work.
local -a lines
-local matchq=${matches[$chars]//(#m)[\][()\\*?#<>~^]/\\$MATCH}
+local matchq=${matches[$chars]//(#m)[\][|()\\*?#<>~^]/\\$MATCH}
lines=(${(kon)history[(R)$matchq]})
HISTNO=$lines[-1]
Messages sorted by:
Reverse Date,
Date,
Thread,
Author