Skip to content

Commit

Permalink
Improve handling of the '--help' option in _zlua() function to improve
Browse files Browse the repository at this point in the history
zsh compatibility.
  • Loading branch information
skywind3000 committed Apr 30, 2024
1 parent 7af012c commit 7c890c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions z.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7c890c3

Please sign in to comment.