AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 351 forks source link

How do I show help for a multiline input? #349

Closed craicoverflow closed 3 years ago

craicoverflow commented 3 years ago

I am not able to show the help text when using a multiline input - but it works fine for other types.

Sample code:

package main

import (
    "os"

    "github.com/AlecAivazis/survey/v2"
)

func main() {

    var description string

    descPrompt := &survey.Multiline{
        Message: "Description",
        Help:    "Valid characters are: a, b, c",
    }

    err := survey.AskOne(descPrompt, &description)
    if err != nil {
        os.Exit(1)
    }
}

Sample input:

❯ go run testdir/test.go
? Description [Enter 2 empty lines to finish]

Am I doing something wrong, or is there a bug?

AlecAivazis commented 3 years ago

Hey @chiaretto - thanks for opening this issue. Unforunately multiline inputs do not have support for the help text at the moment, you can see more information on this here: https://github.com/AlecAivazis/survey/issues/236.

I'm going to close this issue to keep things tidy, feel free to contribute on that issue :)

fabianofernandeszup commented 3 years ago

Hi @AlecAivazis , I think you marked me by mistake on this issue.