Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sourlemonjuice/shell-readline
Use GNU readline to get user input. Like the "read" command, but needs to do more
https://github.com/sourlemonjuice/shell-readline
readline shell utility
Last synced: 22 days ago
JSON representation
Use GNU readline to get user input. Like the "read" command, but needs to do more
- Host: GitHub
- URL: https://github.com/sourlemonjuice/shell-readline
- Owner: SourLemonJuice
- License: mit
- Created: 2024-08-21T09:53:41.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T20:29:23.000Z (2 months ago)
- Last Synced: 2024-10-16T07:39:48.216Z (22 days ago)
- Topics: readline, shell, utility
- Language: C
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shell-readline
Use GNU readline to get user input than output them to `stdout`.\
Try to replace the bash `read`, because that's too basic and also has problems when inputting wide characters.## Build
Goto `source/` directory and run `make`, `clang` will help everyone equally
## Usage
Run `./shell-readline help` to get help
```text
Note: This program doesn't have any flags(for now)
Usage: simple-readlineThe final user input will be printed to stdout, the readline interface will displayed on stderr.
In bash, use "simple-readline | cat -" to provide stdin to another command.
Also can use "input=$(simple-readline)" to write input to a variable.
Bash's Command Substitution and Pipe only use stdout stream, remember this when writing script.If any arguments are entered, this help message will be displayed.
```## See also
- [An answer of StackOverflow: How to store standard error in a variable](https://stackoverflow.com/a/963857/25416550)
- [source/test.sh](source/test.sh) in this repository
-## License
Published under MIT license