Comments (4)
Hi Giorgio,
Thanks for using the library! The #ask
prompt editing capabilities are in the pipeline but not ready yet. Currently #ask
works pretty much like gets
call. I have only managed to roll out this feature to #multiline
prompt in master. This hasn't been released yet and you can play with it using examples/multiline.rb
file.
The Reader#read_line
already provides the history navigation and text editing capabilities. However, I need to work more on it to account for line prompts etc... Also to bring many goodies over from Readline Editor it will require more work. I really want the Reader
to be capable replacement for Readline and I intend to extract it as a standalone dependency. However, I cannot promise when this is going to be done.
I would encourage you to use tty-prompt
with the view that the #ask
will have history and editing features added in the near future. There is long outstanding issue about adding #autocomplete
prompt which will be possible once I've done the editing bit.
from tty-prompt.
Thanks Piotr for detailed answer!
So I wait a possible Reader
replacement of Readline
:-)
regards
giorgio
from tty-prompt.
Hey Giorgio, I've just released v0.12.0
that replaces ask
prompt with a new editing and history buffer features. You don't have to specify :track_history
option if you want history buffer. Enjoy!
from tty-prompt.
Great Piotr!
sorry for delay (I'm so busy at work)
Asap I try new ask features and I'll for sure mention your beautiful work as dependency of a shell to interface ChatScript, I'll publish next weeks at www.github.com/solyaris/rChatScript
thanks again
respect
giorgio
from tty-prompt.
Related Issues (20)
- Feature request: Prompt for value or optionally go into editor mode HOT 2
- Using an enumerator for choices HOT 3
- select hangs after a pipe HOT 1
- multi_select validation for "min" option ignored if "max" validation passes HOT 1
- Select not working in windows + bash terminal HOT 1
- tty-prompt does not seem to work in ARM64 Mac Monterey jruby-9.3.3.0
- multi_select: pressing ctrl_a or ctrl_r on filtered results, raises an exception
- Better error message for validation
- Dashes in a value provided to ask are converted to spaces after up-arrow
- Suggestion for documentation HOT 1
- Handle error when `value` is not a string
- ask and multiline flicker while typing
- Unable to define default value for multiline
- Customizing the check boxes?
- `select` errors when provided a hash and a block
- Allow using `k`/`j` in addition to arrow keys to move selection up/down HOT 1
- Allow wrap-around when using arrow keys to change selection HOT 2
- Request: `filepath` and `pathname` file existance validator HOT 1
- Allow messages to be passed as keyword argument HOT 1
- Add option to save history and reload.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tty-prompt.