[fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Dusan Halicky
Hi. I have simple console application: program test; var s : string; begin while s 'q' do readln(s); end. I compiled it in windows (FPC 2.4.0), run it in cmd.exe and I was surprised that history of commands is working out of the box (by pressing arrow UP). I thought it is done

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread David W Noon
On Wed, 1 Sep 2010 19:30:07 +0200, Dusan Halicky wrote about [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux: I compiled it in windows (FPC 2.4.0), run it in cmd.exe and I was surprised that history of commands is working out of the box (by pressing arrow UP

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Dusan Halicky
I compiled it in windows (FPC 2.4.0), run it in cmd.exe and I was surprised that history of commands is working out of the box (by pressing arrow UP). That is standard behaviour for most modern shells. The readln() function has nothing to do with libreadline. The problem you are seeing is

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Michael Van Canneyt
On Wed, 1 Sep 2010, Dusan Halicky wrote: I compiled it in windows (FPC 2.4.0), run it in cmd.exe and I was surprised that history of commands is working out of the box (by pressing arrow UP). That is standard behaviour for most modern shells. The readln() function has nothing to do with

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Dusan Halicky
If you run the program twice, you'll see that you can scroll back even to what you typed in the first run of the program; This is clear proof that it is not the program itself which does that. Ok. This somehow convinced me. Can I achieve the same thing in bash?

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Michael Van Canneyt
On Wed, 1 Sep 2010, Dusan Halicky wrote: If you run the program twice, you'll see that you can scroll back even to what you typed in the first run of the program; This is clear proof that it is not the program itself which does that. Ok. This somehow convinced me. Can I achieve the same

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread David W Noon
On Wed, 1 Sep 2010 21:17:04 +0200, Dusan Halicky wrote about Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux: If you run the program twice, you'll see that you can scroll back even to what you typed in the first run of the program; This is clear proof