Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juhp/simple-prompt
https://github.com/juhp/simple-prompt
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/juhp/simple-prompt
- Owner: juhp
- License: other
- Created: 2023-04-02T09:41:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-13T05:23:47.000Z (5 months ago)
- Last Synced: 2024-10-17T19:44:16.697Z (22 days ago)
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/simple-prompt
- Size: 29.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-prompt
A simple commandline text prompt library for user input.
The `SimplePrompt` module provides:
- `prompt`: returns a string
- `promptNonEmpty` prompts for non-empty string
- `promptInitial` with pre-filled initial input
- `promptPassword` prompts for password
- `promptChar` prompts for a character
- `promptKeyPress` waits for a key press
- `promptEnter` waits for Enter key
- `yesNo` expects y/n answer
- `yesNoDefault` [y/N] or [Y/n]It uses haskeline to read the input.
The `SimplePrompt.Internal` module provides lower-level access to
functional haskeline InputT monad transformer-based prompt functions:- `runPrompt`, `getPrompt*`
- `untilInput`, `mapInput`, `clearedInput`, `nonEmptyInput`.