func runCompletionFish(out io.Writer, kompose *cobra.Command) error {
	kompose.GenFishCompletion(out, true)
	fishInitialization := `
set -l commands  "completion convert help version"
complete -c kompose -f
complete -c kompose -n "not __fish_seen_subcommand_from $commands" -a $commands
complete -c kompose -n "__fish_seen_subcommand_from completion" -a "bash zsh fish"
`
	out.Write([]byte(fishInitialization))
	return nil
}
/*
Fish shell auto-completion support
package cmd
import (
	"bytes"
	"fmt"
	"io"
	"os"
	log "github.com/sirupsen/logrus"
	"github.com/spf13/cobra"
)
var completion = &cobra.Command{
	Use:   "completion SHELL",
	Short: "Output shell completion code",
	Long: `Generates shell completion code.
Auto completion supports bash, zsh and fish. Output is to STDOUT.
source <(kompose completion bash)
source <(kompose completion zsh)
kompose completion fish | source
Will load the shell completion code.
	`,
	RunE: func(cmd *cobra.Command, args []string) error {
		err := Generate(cmd, args)
		if err != nil {
			log.Fatalf("Error: %s", err)
		}
		return nil
	},
}
func Generate(cmd *cobra.Command, args []string) error {
	if len(args) == 0 {
		return fmt.Errorf("shell not specified. ex. kompose completion [bash|zsh|fish]")
	}
	if len(args) > 1 {
		return fmt.Errorf("too many arguments. Expected only the shell type. ex. kompose completion [bash|zsh|fish]")
	}
	switch args[0] {
	case "bash":
		return cmd.Root().GenBashCompletion(os.Stdout)
	case "zsh":
		return runCompletionZsh(os.Stdout, cmd.Root())
	case "fish":
		return runCompletionFish(os.Stdout, cmd.Root())
	default:
		return fmt.Errorf("not a compatible shell, bash, zsh and fish are only supported")
	}
}
func init() {
	RootCmd.AddCommand(completion)
}