func ToFishCompletion(c *cli.Context, hideHelp bool) (string, error) {
	var app *cli.App
	for _, v := range c.Lineage() {
		if v.App != nil {
			app = v.App
		}
	}

	prog, err := Prog(c)
	if err != nil {
		return "", err
	}
	app.Name = prog

	// to include the command in the completion script.
	showFishCompletionCommand()

	if hideHelp {
		// to remove the help command and help flags.
		removeHelp(app)
	}

	return app.ToFishCompletion()
}
// ToFishCompletion creates a fish completion string for the `*App` of the root
// context from c. The function errors if either parsing or writing of the
// string fails.
ToFishCompletion creates a fish completion string for the `*App` of the root
context from c. The function errors if either parsing or writing of the
string fails.
// ToFishCompletion creates a fish completion string for the ` * App ` of the root // context from c . The function errors if either parsing or writing of the // string fails .
func ToFishCompletion(c *cli.Context, hideHelp bool) (string, error) {
	var app *cli.App
	for _, v := range c.Lineage() {
		if v.App != nil {
			app = v.App
		}
	}
	prog, err := Prog(c)
	if err != nil {
		return "", err
	}
	app.Name = prog
	showFishCompletionCommand()
	if hideHelp {
		removeHelp(app)
	}
	return app.ToFishCompletion()
}
func ToFishCompletion ( c * cli . Context , hideHelp bool ) ( string , error ) { var app * cli . App for _ , v := range c . Lineage ( ) { if v . App != nil { app = v . App } } prog , err := Prog ( c ) if err != nil { return " " , err } app . Name = prog showFishCompletionCommand ( ) if hideHelp { removeHelp ( app ) } return app . ToFishCompletion ( ) }
ToFishCompletion creates a fish completion string for the `*App` of the root
context from c. The function errors if either parsing or writing of the
string fails.
ToFishCompletion creates a fish completion string for the ` * App ` of the root context from c . The function errors if either parsing or writing of the string fails .
// to include the command in the completion script. // to remove the help command and help flags.