Skip to content

Commit 7a19a69

Browse files
committed
fish: fix local var
1 parent 3959122 commit 7a19a69

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

example/cmd/_test/fish.fish

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
function _example_completion
2+
set --local data
23
IFS='' set data (echo (commandline -cp)'' | sed "s/ \$/ ''/" | xargs example _carapace fish 2>/dev/null)
34
if [ $status -eq 1 ]
45
IFS='' set data (echo (commandline -cp)"'" | sed "s/ \$/ ''/" | xargs example _carapace fish 2>/dev/null)

internal/shell/fish/snippet.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
// Snippet creates the fish completion script.
1212
func Snippet(cmd *cobra.Command) string {
1313
return fmt.Sprintf(`function _%[1]v_completion
14+
set --local data
1415
IFS='' set data (echo (commandline -cp)'' | sed "s/ \$/ ''/" | xargs %[2]v _carapace fish 2>/dev/null)
1516
if [ $status -eq 1 ]
1617
IFS='' set data (echo (commandline -cp)"'" | sed "s/ \$/ ''/" | xargs %[2]v _carapace fish 2>/dev/null)

0 commit comments

Comments
 (0)