Skip to content

Commit ba83bf6

Browse files
authored
fix potential compatibilty issue for some fish shell versions and add autocompletion for cmd options
1. `alias` command not available in some fishshell versions like 3.3.1. use fish-native `function` instead; 2. add autocompletion for cmd options benefitting from magic power of fish. just type `z -` and press tab. enjoy yourself.
1 parent 0992ebf commit ba83bf6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

z.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2423,7 +2423,9 @@ function _zlua
24232423
end
24242424
24252425
if test -z "$_ZL_CMD"; set -x _ZL_CMD z; end
2426-
alias "$_ZL_CMD"=_zlua
2426+
function $_ZL_CMD -w _zlua -d "alias $_ZL_CMD=_zlua"
2427+
_zlua $argv
2428+
end
24272429
]]
24282430

24292431
script_init_fish = [[

0 commit comments

Comments
 (0)