From 7c890c3645081014eab4be2ab45e8640f86f62d7 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Tue, 30 Apr 2024 17:16:36 +0800 Subject: [PATCH] Improve handling of the '--help' option in _zlua() function to improve zsh compatibility. --- z.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/z.lua b/z.lua index 6d6a3a2..a14bb82 100755 --- a/z.lua +++ b/z.lua @@ -4,7 +4,7 @@ -- z.lua - a cd command that learns, by skywind 2018-2022 -- Licensed under MIT license. -- --- Version 1.8.18, Last Modified: 2024/04/07 11:24 +-- Version 1.8.18, Last Modified: 2024/04/30 17:11 -- -- * 10x faster than fasd and autojump, 3x faster than z.sh -- * available for posix shells: bash, zsh, sh, ash, dash, busybox @@ -2188,7 +2188,8 @@ _zlua() { -s) local arg_strip="-s" ;; -i) local arg_inter="-i" ;; -I) local arg_inter="-I" ;; - -h|--help) local arg_mode="-h" ;; + -h) local arg_mode="-h" ;; + --help) local arg_mode="-h" ;; --purge) local arg_mode="--purge" ;; *) break ;; esac