
Hi Malcolm.
I tried this on both a Cygwin (environment variable TERM=cygwin) and a
Windows XP console with GHC 6.0.
Under Cygwin, these problems occurred:
1. ^K and ^L both appear as themselves, rather than causing deletion:
prompt> abc^Kefg
2. When editing an item in the history buffer, if I delete a one or more
characters and then move to the end of the line with the cursor, it "runs
off the end" with the same number of characters added at the end. Those
characters are taken from the characters at what was previously the end of
the line eg:
prompt> hello
delete 'l'
prompt> helo
move to end of line:
prompt> heloo
(This does not happen with a new item, only with history items.)
This happens with a normal Windows XP command prompt too (that is, without
any Haskell program running) so I suspect that it is an overprinting of the
Windows terminal handling on your test program's terminal handling.
The interesting result of that is that successive invocations of the same
executable retain the command line history of previous runs.
I would expect substantially different results running under a Win98 command
line as console line editing is not provided on those older versions of the
OS.
Under the Windows XP command line prompt:
1. The stty system call is redundant:
C:\lang\source\ghc\lineedit>le
'stty' is not recognized as an internal or external command,
operable program or batch file.
prompt>
Checking that the preprocessor symbol "i386_unknown_mingw32_TARGET" is not
defined fixed that.
2. - See points 1 and 2 of the Cygwin problems above and the conclusions
drawn there.
Cheers
Mike Thomas.
| -----Original Message-----
| From: glasgow-haskell-users-admin@haskell.org
| [mailto:glasgow-haskell-users-admin@haskell.org]On Behalf Of Malcolm
| Wallace
| Sent: Friday, June 20, 2003 2:39 AM
| To: glasgow-haskell-users@haskell.org
| Cc: libraries@haskell.org
| Subject: Readline (was Re: state of ghc6 on sparc)
|
|
| Alastair Reid