aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-05 12:21:53 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-05 12:21:53 +0800
commitc513b2bcab17069e45dcdeefe36f789361450240 (patch)
treeb7c09a6a3c79c6a1e41f085b2e165862153529d6
parent0243b0c794dde79bce0816f1d52461ae0fc96f9d (diff)
chore: remove redundant comments in fish completion script
-rw-r--r--mingling_core/tmpls/comps/fish.fish8
1 files changed, 0 insertions, 8 deletions
diff --git a/mingling_core/tmpls/comps/fish.fish b/mingling_core/tmpls/comps/fish.fish
index 8be948a..64b4ed3 100644
--- a/mingling_core/tmpls/comps/fish.fish
+++ b/mingling_core/tmpls/comps/fish.fish
@@ -5,7 +5,6 @@ function __<<<bin_name>>>_fish_complete
set -l cursor (commandline -C)
set -l current_token (commandline -ct)
- # Calculate current word and word index
set -l current_word ""
set -l previous_word ""
set -l word_index 0
@@ -45,7 +44,6 @@ function __<<<bin_name>>>_fish_complete
end
end
- # Handle cursor after last word
if test $word_index -eq 0 -a (count $cmdline) -gt 0
set word_index (count $cmdline)
if test -n "$current_token" -a "$current_token" != "$cmdline[-1]"
@@ -56,17 +54,14 @@ function __<<<bin_name>>>_fish_complete
set previous_word $cmdline[-1]
end
- # Ensure word_index is within bounds
if test $word_index -gt (count $cmdline)
set word_index (count $cmdline)
end
- # Replace hyphens with carets for jvn_comp
set -l buffer_replaced (string replace -a "-" "^" -- "$buffer")
set -l current_word_replaced (string replace -a "-" "^" -- "$current_word")
set -l previous_word_replaced (string replace -a "-" "^" -- "$previous_word")
- # Build args array
set -l args
set -a args -f "$buffer_replaced" -C "$cursor" -w "$current_word_replaced" -p "$previous_word_replaced"
@@ -78,7 +73,6 @@ function __<<<bin_name>>>_fish_complete
set -a args -i "$word_index"
- # Replace hyphens in all words
if test (count $cmdline) -gt 0
set -l all_words_replaced
for word in $cmdline
@@ -103,10 +97,8 @@ function __<<<bin_name>>>_fish_complete
set -a args -a ""
end
- # Add shell type argument
set -a args -F "fish"
- # Call jvn_comp and handle output
set -l output
if not <<<bin_name>>> __comp $args 2>/dev/null | read -z output
return