summaryrefslogtreecommitdiff
path: root/shell/key-bindings.bash
diff options
context:
space:
mode:
authorLangLangBart <92653266+LangLangBart@users.noreply.github.com>2025-07-25 10:33:18 +0200
committerGitHub <noreply@github.com>2025-07-25 17:33:18 +0900
commit354d0468c126c4e03b3578a752afedfd6451fd0d (patch)
tree032f516128c840ce2d3afa99c7c62ed9622c6f10 /shell/key-bindings.bash
parent4efcc344c35e8bb7e6ba7bb23e5885051420b361 (diff)
downloadfzf-354d0468c126c4e03b3578a752afedfd6451fd0d.tar.gz
fix(shell): check for mawk existence before version check (#4468)
close #4463
Diffstat (limited to 'shell/key-bindings.bash')
-rw-r--r--shell/key-bindings.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash
index a1d4fa23..50edecef 100644
--- a/shell/key-bindings.bash
+++ b/shell/key-bindings.bash
@@ -33,9 +33,9 @@ __fzf_exec_awk() {
__fzf_awk=awk
if [[ $OSTYPE == solaris* && -x /usr/xpg4/bin/awk ]]; then
__fzf_awk=/usr/xpg4/bin/awk
- else
+ elif command -v mawk >/dev/null 2>&1; then
local n x y z d
- IFS=' .' read n x y z d <<< $(command mawk -W version 2> /dev/null)
+ IFS=' .' read -r n x y z d <<< $(command mawk -W version 2> /dev/null)
[[ $n == mawk ]] && (( d >= 20230302 && (x * 1000 + y) * 1000 + z >= 1003004 )) && __fzf_awk=mawk
fi
fi