
On Friday 21 November 2008 10:49:47 Jules Bean wrote:
Philip Hölzenspies wrote:
Also, there are no de facto escape sequences, because special keys (like function and arrow keys) have different sequences on different terminals. A useful tip that may be useful to include in the wiki is an easy trick that will help you find out your terminals escape sequences. I usually just like to start an application that has no editline or readline capabilities and press the keys. Telnet is one of my favorite applications for this purpose.
But this is abhorrent.
The whole point of the existence of termcap and libraries which build upon it (ncurses, readline, editline, etc) is so that individual users do not have to work out what the escape sequences produced by their terminal are.
Something must be very very broken : surely it is not expected behaviour for editline to need configuration in this way?
One can call it broken, another will say users should settle for the default behaviour. Neither readline, nor editline *need* configuration this way, because they do come with sensible defaults. However, some people want custom behaviour and they'll have to figure out how stuff works for their machine. I think a sensible purpose of a Wiki is to help people get some of the more tricky business done. Also, I don't see what is wrong with typing in terms of escape sequences per se, but for those that have something against it; there's bound to be some program somewhere that will allow you to type <up> instead of ^[[A. The upside of the telnet tip, is that it works on many *NIXs and their derivatives. It even works on OSX, so it's a one-size-fits-(almost)-all tip. Philip