1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-14 19:59:48 +00:00

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.
This commit is contained in:
Simsum
2023-05-04 17:49:20 +08:00
committed by GitHub
parent 0992ebf9f1
commit ba83bf67b2

4
z.lua
View File

@@ -2423,7 +2423,9 @@ function _zlua
end
if test -z "$_ZL_CMD"; set -x _ZL_CMD z; end
alias "$_ZL_CMD"=_zlua
function $_ZL_CMD -w _zlua -d "alias $_ZL_CMD=_zlua"
_zlua $argv
end
]]
script_init_fish = [[