Replies: 4 comments 1 reply
-
The ability to provide an initial string to edit does seem useful. The underlying support in linenoise would need to come through here though: https://github.com/msteveb/linenoise Then we could pull it into jimtcl and add it to the history extension. Regarding extra key bindings, again they would need to come through linenoise. We already have ctrl-w for delete word to left but not move word left or right. |
Beta Was this translation helpful? Give feedback.
-
I did like the idea of extra key bindings. See here - msteveb/linenoise@6cd2bcb And here for the ability to specify an initial value - msteveb/linenoise@d26a12b Not yet integrated into JimTcl and history though |
Beta Was this translation helpful? Give feedback.
-
Thank you @msteveb! |
Beta Was this translation helpful? Give feedback.
-
This has now been integrated |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm learning jimtcl and I'm doing a sqlite backed terminal app. The users can add new db entries but they should also be able to edit existing ones. So I need a way to feed the initial line to getline. I modified the readline extension[0] for the purpose as it felt easier. But it would be nice to have the same mechanism with
history getline
. If you think it's a good idea I can give a shot at implementing it. Maybe you can also let me know what you think about adding the word motion keys M-b M-f and M-w (back forward and delete word). Thank you!Edit: Another thing, it would also be useful to know if the user pressed C-d or just Enter on empty input. Right now there is no way of distinguishing between the two.
[0]
Beta Was this translation helpful? Give feedback.
All reactions