Replies: 2 comments
-
Hi Ognjen, Currently the way you wish to do it, the answer is: no. Any time your provide The initial idea for Now, we could explore an improvement in TTY::Editor.open(text: "") do |file|
puts file.read
end Any thoughts? |
Beta Was this translation helpful? Give feedback.
-
Hi, I tried prompt and multiline and they don't really do the same thing. I got there by opening a temp file and then reading it once the editor is closed. It's fine just a bit messy. That implementation looks great. |
Beta Was this translation helpful? Give feedback.
-
Hi,
is there a way to get the text user entered when using
TTY::Editor.open(text: "")
without having to open a tempfile manually and then read it?Sidenote:
examples/tempfile.rb
should be changed to beTTY::Editor.open(text
instead ofTTY::Editor.open(content
Beta Was this translation helpful? Give feedback.
All reactions