summaryrefslogtreecommitdiff
path: root/scripts/deploy/completions/fish.fish
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-15 01:12:06 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-15 01:12:06 +0800
commit10ed02b8541a80e60f7ad9f9fb51f8070d6be525 (patch)
treebfc034d1ad0c2d5567a53ece074932040dfb8d43 /scripts/deploy/completions/fish.fish
parent72f80ea51f25256d0c463c2f3dc3d8670cfc4634 (diff)
Add completions system for shell autocompletion
Diffstat (limited to 'scripts/deploy/completions/fish.fish')
-rw-r--r--scripts/deploy/completions/fish.fish8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/deploy/completions/fish.fish b/scripts/deploy/completions/fish.fish
index 2904495..558b602 100644
--- a/scripts/deploy/completions/fish.fish
+++ b/scripts/deploy/completions/fish.fish
@@ -24,13 +24,13 @@ function __jvn_fish_complete
end
set -l args \
- -f "$buffer" \
+ -f (string replace -a - ^ -- "$buffer") \
-C "$cursor" \
- -w "$current_word" \
- -p "$previous_word" \
+ -w (string replace -a - ^ -- "$current_word") \
+ -p (string replace -a - ^ -- "$previous_word") \
-c "$cmdline[1]" \
-i "$word_index" \
- -a $cmdline
+ -a (string replace -a - ^ -- "$cmdline")
set -l output (jvn_comp $args 2>/dev/null)
if test "$output" = "_file_"