mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 22:17:20 +00:00
fix: avoid relative completion backend execution
This commit is contained in:
1 parent
62a4d44b58
commit
4f2dd70b8c
5 files changed
+21
-46
No files matched your search
@@ -22,19 +22,6 @@ __ccs_completion_run() {
|
||||
local current="$1"
|
||||
shift || true
|
||||
|
||||
local script_path script_dir repo_root repo_cli
|
||||
script_path="${(%):-%N}"
|
||||
script_dir="${script_path:A:h}"
|
||||
repo_root="${script_dir:h:h}"
|
||||
repo_cli="${repo_root}/dist/ccs.js"
|
||||
if [[ ! -f "${repo_cli}" ]]; then
|
||||
repo_cli="${repo_root}/bin/ccs.js"
|
||||
fi
|
||||
if [[ -f "${repo_cli}" ]]; then
|
||||
node "${repo_cli}" __complete --shell zsh --current "${current}" -- "$@" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
|
||||
if (( $+commands[ccs] )); then
|
||||
ccs __complete --shell zsh --current "${current}" -- "$@" 2>/dev/null
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user