From c513b2bcab17069e45dcdeefe36f789361450240 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Wed, 5 Aug 2026 12:21:53 +0800 Subject: chore: remove redundant comments in fish completion script --- mingling_core/tmpls/comps/fish.fish | 8 -------- 1 file changed, 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 __<<>>_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 __<<>>_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 __<<>>_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 __<<>>_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 __<<>>_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 <<>> __comp $args 2>/dev/null | read -z output return -- cgit