Skip to content

Commit 7c890c3

Browse files
author
skywind3000
committed
Improve handling of the '--help' option in _zlua() function to improve
zsh compatibility.
1 parent 7af012c commit 7c890c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

z.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-- z.lua - a cd command that learns, by skywind 2018-2022
55
-- Licensed under MIT license.
66
--
7-
-- Version 1.8.18, Last Modified: 2024/04/07 11:24
7+
-- Version 1.8.18, Last Modified: 2024/04/30 17:11
88
--
99
-- * 10x faster than fasd and autojump, 3x faster than z.sh
1010
-- * available for posix shells: bash, zsh, sh, ash, dash, busybox
@@ -2188,7 +2188,8 @@ _zlua() {
21882188
-s) local arg_strip="-s" ;;
21892189
-i) local arg_inter="-i" ;;
21902190
-I) local arg_inter="-I" ;;
2191-
-h|--help) local arg_mode="-h" ;;
2191+
-h) local arg_mode="-h" ;;
2192+
--help) local arg_mode="-h" ;;
21922193
--purge) local arg_mode="--purge" ;;
21932194
*) break ;;
21942195
esac

0 commit comments

Comments
 (0)