summaryrefslogtreecommitdiffstats
path: root/examples/prompts/get-input-vi-mode.py
blob: 4073bcdd2bc1e3163c1dc0c377db4ca17b4bca32 (plain)
1
2
3
4
5
6
7
#!/usr/bin/env python
from prompt_toolkit import prompt

if __name__ == "__main__":
    print("You have Vi keybindings here. Press [Esc] to go to navigation mode.")
    answer = prompt("Give me some input: ", multiline=False, vi_mode=True)
    print(f"You said: {answer}")