You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When irb is invoked in emacs with inf-ruby, it has only a dumb terminal to work with so, as a preliminary step it sets the PAGER environment variable to "/bin/cat" to effectively disable paging.
Hirb currently considers "/bin/cat" an invalid pager because it is an absolute path name. It seems it should strip the leading path first before checking its validity.
I believe this fixes it in pager.rb :
def pager_command(*commands) #:nodoc:
@pager_command = (!@pager_command.nil? && commands.empty?) ? @pager_command :
begin
env_pager = ENV['PAGER'] ? File.basename(ENV['PAGER']) : nil
commands = [env_pager, 'less', 'more', 'pager'] if commands.empty?
commands.compact.uniq.find {|e| Util.command_exists?(e[/\w+/]) }
end
end
The text was updated successfully, but these errors were encountered:
Thanks for reporting your issue! This is one of my 17 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.
When irb is invoked in emacs with inf-ruby, it has only a dumb terminal to work with so, as a preliminary step it sets the PAGER environment variable to "/bin/cat" to effectively disable paging.
Hirb currently considers "/bin/cat" an invalid pager because it is an absolute path name. It seems it should strip the leading path first before checking its validity.
I believe this fixes it in pager.rb :
The text was updated successfully, but these errors were encountered: