From a5b404a8de5c0ef426f9bb4acbb31778862e2b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Reegn?= Date: Thu, 16 Nov 2023 09:53:54 +0100 Subject: [PATCH] fix trailing pipe handling on macs (#29) --- jq.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jq.plugin.zsh b/jq.plugin.zsh index 7651e98..35e85f4 100755 --- a/jq.plugin.zsh +++ b/jq.plugin.zsh @@ -2,7 +2,7 @@ if [[ -o zle ]]; then __lbuffer_strip_trailing_pipe() { # Strip a trailing pipe and its surrounding whitespace. - echo "$LBUFFER" | sed 's/[[:space:]]*\|[[:space:]]*$//' + sed -E 's/[[:space:]]*\|[[:space:]]*$//' <<<"$LBUFFER" } __get_query() {