mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 08:18:04 +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
@@ -11,17 +11,6 @@ function __fish_ccs_complete
|
||||
set -e tokens_before_current[-1]
|
||||
end
|
||||
|
||||
set -l script_file (status filename)
|
||||
set -l repo_root (realpath (dirname $script_file)/../.. 2>/dev/null)
|
||||
set -l repo_cli "$repo_root/dist/ccs.js"
|
||||
if not test -f "$repo_cli"
|
||||
set repo_cli "$repo_root/bin/ccs.js"
|
||||
end
|
||||
if test -f "$repo_cli"
|
||||
node "$repo_cli" __complete --shell fish --current "$current" -- $tokens_before_current 2>/dev/null
|
||||
return
|
||||
end
|
||||
|
||||
if command -sq ccs
|
||||
ccs __complete --shell fish --current "$current" -- $tokens_before_current 2>/dev/null
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user