-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reline::Terminfo::TerminfoError
in Reline
, but no error in Readline
.
#543
Labels
bug
Something isn't working
Comments
ioquatix
changed the title
Perhaps a small bug or, more accurately, a difference in behaviour between Reline and Readline, in regards to missing ENV variables (error is: Reline::Terminfo::TerminfoError in Reline, but no error in Readline)
Reline::Terminfo::TerminfoError in Reline, but no error in Readline.
Jun 2, 2023
ioquatix
changed the title
Reline::Terminfo::TerminfoError in Reline, but no error in Readline.
Jun 2, 2023
Reline::Terminfo::TerminfoError
in Reline, but no error in Readline
.
ioquatix
changed the title
Jun 2, 2023
Reline::Terminfo::TerminfoError
in Reline, but no error in Readline
.Reline::Terminfo::TerminfoError
in Reline
, but no error in Readline
.
I encountered the same error-message as this issue but with a different cause. I resolved my issue with |
Related to, or maybe same to #447 |
If it makes a difference, I do not use Overmind or tmux.
|
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 5, 2024
Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled == false` when fiddle or curses cannot be loaded. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 And does the same when Terminfo is present but TERM is not. You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 5, 2024
Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled == false` when fiddle or curses cannot be loaded. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 And does the same when Terminfo is present but TERM is not. You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 5, 2024
Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled == false` when fiddle or curses cannot be loaded. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 And does the same when Terminfo is present but TERM is not. You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 5, 2024
…alse` Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 5, 2024
…alse` Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 5, 2024
Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
to ima1zumi/reline
that referenced
this issue
Apr 6, 2024
Fix ruby#447 ruby#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`.
ima1zumi
added a commit
that referenced
this issue
Apr 6, 2024
Fix #447 #543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`.
matzbot
pushed a commit
to ruby/ruby
that referenced
this issue
Apr 6, 2024
be found (ruby/reline#673) Fix ruby/reline#447 ruby/reline#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`. ruby/reline@4ce247ce2b
Fixed by #673 |
artur-intech
pushed a commit
to artur-intech/ruby
that referenced
this issue
Apr 26, 2024
be found (ruby/reline#673) Fix ruby/reline#447 ruby/reline#543 This problem occurs when Fiddle can be loaded, curses can be loaded, and TERM is not registered in Terminfo. It should also occur at hardcopy terminals and when Terminfo information is low, but no such reports have been received. Reline should not abort the process because of missing Terminfo. Reline proceeds with `Reline::Terminfo.enabled? == false` when fiddle or curses cannot be loaded. And does the same when Terminfo is present but TERM is not. https://github.com/ruby/reline/blob/ebab2875f1226f877376558d8758bc0e2a1776c7/lib/reline/terminfo.rb#L156-L160 You can check the operation with `TERM=foo bundle exec bin/console`. ruby/reline@4ce247ce2b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there reline-devs,
Following hsbt's proposal to replace readline with reline, I started to
look at how I can replace the old readline code in my own projects.
(On that note, it may be useful to provide some standalone .rb files
somewhere associated with the project here or elsewhere; I had to
learn by trial-and-error, and re-use my old readline code and adapt
it. For instance, Reline::HISTORY exists, like Readline::HISTORY, but
I did not see any .rb file or documentation that mentions this.)
Anyway.
As I am in the process of replacing the old readline code, or at the
least make reline an additional option, I ran into a situation where
the last output (it should print the current working directory, in
colours) gets swallowed away. I looked at my ruby code but the ruby
code was working fine, so the problem must have originated from
elsewhere.
So, during my investigation I thought that my ENV variables messed
up something.
I started a clean version of bash via:
So I had basically no ENV variables there.
Interestingly, if you are in such an environment, and start irb,
and then try to do this:
The following error shows up:
However had when I do:
No such error shows up.
Now you may argue which behaviour is better of course. Reline tells
us about a problem; readline on the other hand simply continues
as-is.
I don't really care about which variant is better, but it is clear
that reline is NOT behaving like readline in this case.
On a more general design philosophy, I think it is not a good idea
to insta-die upon require time, based on external conditions (in
this context that reline relies on the terminfo database, which
can not be found because of missing ENV variables). I don't think
an exception should be raised in this case, so I consider readline's
behaviour more standard, idiomatic ruby. But, as stated, I don't
care either way - I am only here to report that, since it surprised
me - now I have to put the require 'reline' into begin/rescue clauses
just for that error alone. (In the shell I am working on, users can
then switch between $stdin.gets, reline and readline; so I already
rescue readline anyway, since it is external, and will do for reline
as well, so it does not really affect me. It only surprised me.)
PS: I think it may also be useful IF there is a difference in behaviour
between reline and Readline, to document it. I do not know how much
compatibility you guys aim for, but some text-file or something
that could mention differences, could be useful. Right now I am
primarily tinkering, but there is very little documentation out there
for reline, so switching to reline is not so trivial for casual
users/developers. Adding more documentation here for reline would
be great; it could also help motivate more people to transition into
reline. (I'll continue with my investigation of that odd thing where
the last input is swallowed; I first noticed this already via readline
on windows, and the prompt is shown briefly but then vanishes. Will
have to track it down, but this is a separate issue - the issue here
is primarily about the terminfo-situation, which appears to be
different between reline and readline.)
The text was updated successfully, but these errors were encountered: