Skip to content

Commit

Permalink
Merge pull request #1109 from carapace-sh/fish-erase
Browse files Browse the repository at this point in the history
fish: erase existing for tombstone
  • Loading branch information
rsteube authored Feb 15, 2025
2 parents d8ec7dd + 621fd67 commit 6fba736
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion example/cmd/_test/fish.fish
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function _example_callback
commandline -cp | sed "s/\$/"(_example_quote_suffix)"/" | sed "s/ \$/ ''/" | xargs example _carapace fish
end

complete -c example -f
complete -e 'example'
complete -c 'example' -f
complete -c 'example' -f -a '(_example_callback)' -r

5 changes: 3 additions & 2 deletions internal/shell/fish/snippet.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function _%v_callback
commandline -cp | sed "s/\$/"(_%v_quote_suffix)"/" | sed "s/ \$/ ''/" | xargs %v _carapace fish
end
complete -c %v -f
complete -e '%v'
complete -c '%v' -f
complete -c '%v' -f -a '(_%v_callback)' -r
`, cmd.Name(), cmd.Name(), cmd.Name(), uid.Executable(), cmd.Name(), cmd.Name(), cmd.Name())
`, cmd.Name(), cmd.Name(), cmd.Name(), uid.Executable(), cmd.Name(), cmd.Name(), cmd.Name(), cmd.Name())
}

0 comments on commit 6fba736

Please sign in to comment.