Skip to content

Tab Completion Inside PromptWizard on Windows #49

@RobinManoli

Description

@RobinManoli

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions