Does anyone else experience this problem? More importantly, is there a
way to fix it?
Any ideas or help appreciated.
Since you asked, yes, I experience this too. You're not alone.
Unfortunately, I cannot answer your second question (how to fix this).
What is the correct place to submit this as a bug report, then?
also experienced that, but when i upgraded to latest one-click, the odd behavior disappeared.
irb(main):003:0> x="athas dfjalsd thsi is a very long line of text asd;fljas;dlf
jas;dlfja;sdlfjas ldjflakj djfkjdf jdkfjsdkfjskdfjksdjf;alskdjflasdjflasjdflasdj
fa;lsdfjalsdkjf jdkfjdkjfkdjfdlksjfslkdjfslkdjfkdjf dkfjkdjfkdjfkd jfl jflskdjfl
aksjdflasdkjflsk djfksjdf klsjdf;lakdsjf sjdflkajsdflksjdflaskjflaskdjf;alsdkfja
;sldkfj;lsd fja;lsd ja;lfk a;ldfj asj;lsdfja;sdlfkj sldkfjslkjfsldjf ;slfjasldjf
a;sdl fasd;lfjs djflskdjf lsdkjf sldjfslkdjf lsf"
=> "athas dfjalsd thsi is a very long line of text asd;fljas;dlfjas;dlfja;sdlfja
s ldjflakj djfkjdf jdkfjsdkfjskdfjksdjf;alskdjflasdjflasjdflasdjfa;lsdfjalsdkjf
jdkfjdkjfkdjfdlksjfslkdjfslkdjfkdjf dkfjkdjfkdjfkd jfl jflskdjflaksjdflasdkjflsk
djfksjdf klsjdf;lakdsjf sjdflkajsdflksjdflaskjflaskdjf;alsdkfja;sldkfj;lsd fja;
lsd ja;lfk a;ldfj asj;lsdfja;sdlfkj sldkfjslkjfsldjf ;slfjasldjfa;sdl fasd;lfjs
djflskdjf lsdkjf sldjfslkdjf lsf"
irb(main):004:0> quit
C:\Documents and Settings\botp>irb --version
irb 0.9.5(05/04/13)
C:\Documents and Settings\botp>ruby -v
ruby 1.8.4 (2006-04-14) [i386-mswin32]
not sure if this helps though.
kind regards -botp
Where can I report this bug?
On Windows, under the cmd.exe shell, you don't need readline for
history, cmd.exe provides it by default. My preference is to run
irb --noreadline. As an added bonus, that means I can paste text with
tabs in it into the irb session.
Cheers,
Dave
Good tip. The only problem is that this breaks tab completion also,
which I find very helpful.
However, you may have found the cause of the bug. Perhaps the fact
that cmd.exe is providing its own history interferes with irb's
readline history. Is there anyway to shut off cmd's history?
(As an aside, I don't think it's possible to run a console program in
Windows without going through cmd.exe)
> Is there anyway to shut off cmd's history?
Doesn't appear to be. It used to be "keys off" but on XP:
C:\>keys /?
Enables or disables command line editing on DOS system
This is present for Compatibility with DOS systems. It has no effect
under Windows XP, as command line editing is always enabled.
>
> (As an aside, I don't think it's possible to run a console program in
> Windows without going through cmd.exe)
>
Not true. For example, try double-clicking on a .rb file in Explorer -
that runs ruby as a console program without going through cmd.exe.
Regards,
Sean
Nice, that solves it for me, too.
Any .bat geeks able to tell me how to modify the irb.bat file that
comes with the one-click installer so that this option is always
specified?
I believe that there is still a cmd.exe running in the background,
powering it.
If I'm wrong, is there a way to make a .bat script invoke irb, but skip
cmd.exe?
Nope. It's spawned directly. Make sure you don't have cmd.exe running,
double-click a .rb file containing just the line
gets
to make sure it waits for input, check Task Manager and you'll see
that there is no cmd.exe running.
>
> If I'm wrong, is there a way to make a .bat script invoke irb, but skip
> cmd.exe?
>
No - .bat (& .cmd) files are scripts that are interpreted by cmd.exe.
However, you could have an irb.rb file containing this (pinched from
irb.bat):
require "irb"
if __FILE__ == $0
IRB.start(__FILE__)
else
# check -e option
if /^-e$/ =~ $0
IRB.start(__FILE__)
else
IRB.setup(__FILE__)
end
end
which would bypass cmd.exe. However, command line history seems to be
built into the console these days (i.e. it's nothing to do with
cmd.exe).
Regards,
Sean
>However, command line history seems to be
> built into the console these days (i.e. it's nothing to do with
> cmd.exe).
Got it. So, is there anyway to shut off history from the windows
console? That would probably solve the large-line-bug while still
allowing tab completion.
I was able to lower buffer size and number of buffers to 1, but it
didn't solve the problem. (The console did keep a 1 line history,
though, so this still might be the problem.)
You can use the old command.com shell (Windows XP still includes it)
instead of cmd.exe. I'm not sure what effect this would have.
Cheers,
Dave
You can either add the --noreadline parameter to the ruby calls at the
top of irb.bat like so:
@echo off
if not "%~f0" == "~f0" goto WinNT
ruby -Sx "%0" --noreadline %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofruby
:WinNT
"%~d0%~p0ruby" -x "%~f0" --noreadline %*
goto endofruby
...
or you can insert it into ARGV in the Ruby section:
...
require "irb"
ARGV.unshift "--noreadline"
...
My favourite feature of disabling readline is that you can right-click
on the console window to access the Mark, Copy and Paste operations.
Cheers,
Dave
I tried
C:\>DOSKEY /listsize=0
That seems to remove the history in cmd.exe?
HTH
torben
> I tried
>
> C:\>DOSKEY /listsize=0
>
> That seems to remove the history in cmd.exe?
Yes, it does - thanks.
Unfortunately, irb's readline still doesn't work, so my theory was
wrong. Oh well.
fwiw,
on my windows cmd.exe properties, i have:
Screen buffer size:
width: 80
height: 999
Window size:
width: 80
height: 41
uncheck: Let system position window