Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab Completion Inside PromptWizard on Windows #49

Open
RobinManoli opened this issue May 28, 2020 · 0 comments
Open

Tab Completion Inside PromptWizard on Windows #49

RobinManoli opened this issue May 28, 2020 · 0 comments

Comments

@RobinManoli
Copy link

RobinManoli commented May 28, 2020

I'm not sure how this is supposed to work, but all I want is to be able to select from a list of choices. When running this in windows cmd or anaconda I can see the default choice, but pressing tab doesn't display anything else. I really need to make this work in anaconda!

from pypsi import shell, wizard
from pypsi.completers import choice_completer

sh = shell.Shell()

wiz = wizard.PromptWizard(
    name="My Wizard",
    description="Welcome",

    steps=(
        # WizardStep(id, name, help, default=None, completer=None, validators=None)
        wizard.WizardStep(
            id = "step1",
            name = "Step 1",
            help = "",
            completer = choice_completer(['choice1', 'choice2', 'choice3']),
            default = "choise1"
        ),
        wizard.WizardStep(
            id = "step2",
            name = "Step 2",
            help = "",
            completer = choice_completer([1, 2, 3]),
            default = 2
        ),
    )
)

result = wiz.run(sh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant