1# input 2 3Prompt for input with readline-like key bindings. 4 5## Motivation 6 7I needed a program to interactively read data from standard input in a 8shell script, preferably with readline-like key bindings. Back then I 9didn't know about [rlwrap][rlwrap repo] and implemented this from10scratch by myself. Contrary to rlwrap, this implementation focuses on11shell scripting and not on providing a "readline wrapper" for existing12applications. As an additional difference, input initially used a fork13of the [linenoise][linenoise repo] editing library. Since linenoise14wasn't properly maintained, later version switched to BSD editline and15GNU readline. The last version, released with linenoise support, is16`0.7.2`.1718## Status1920I use this as part of my [IRC client][insomnia repo] on a daily basis.21For this use case, it works entirely fine as is. However, further22improvements could be made to generalize the completion setup.2324## Features2526* Support for readline-like key bindings.27* Support for tab completions using arbitrary commands.28* Support for a persistent editing history.2930## Installation3132The following software is required:3334* A C99 compiler35* [GNU make][GNU make] (sorry!)36* [GNU readline][GNU readline] (or BSD editline)3738The program can be installed using:3940 $ make install4142On BSD using editline instead of readline is possible by installing using:4344 $ gmake LDLIBS="-ledit -lncurses" install4546## Testing4748A test suite using [tmux][tmux homepage] is also available. The test49suite relies on heuristics to determine whether the process under test50is ready to receive input and might thus be a bit racy. It can be51invoked using:5253 $ make check5455## License5657This program is free software: you can redistribute it and/or modify it58under the terms of the GNU General Public License as published by the59Free Software Foundation, either version 3 of the License, or (at your60option) any later version.6162This program is distributed in the hope that it will be useful, but63WITHOUT ANY WARRANTY; without even the implied warranty of64MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General65Public License for more details.6667You should have received a copy of the GNU General Public License along68with this program. If not, see <http://www.gnu.org/licenses/>.6970[rlwrap repo]: https://github.com/hanslub42/rlwrap71[linenoise repo]: https://github.com/antirez/linenoise72[GNU readline]: https://tiswww.case.edu/php/chet/readline/rltop.html73[GNU make]: https://www.gnu.org/software/make/74[tmux homepage]: https://tmux.github.io75[insomnia repo]: https://github.com/nmeum/insomnia