Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell annoyances




On Mar 19, 2007, at 8:04 PM, Jonas Maebe wrote:


On 20 Mar 2007, at 00:45, Kasey Speakman wrote:

The 'stty erase ^H' fixed it. Why is '^?' the default erase and not this?

The default erase is not '^?', it's just displayed like that because the shell on the other side doesn't understand it. There are about as many different "standards" out there as there are combinations of shells and OSes, so it is fairly predictable that if you throw a new system in the mix you will have to modify some things on either the source or the target to get the same behaviour you were used to before.



Actually, '^?' indicates the delete char code ( octal 0177 ) and it's an exception to the notational convention that ^(some char) means Control-(some char) and means the code for that character with the 7th bit cleared. i.e.

^G = bel = 007 ( G = 0107 )
^M = cr =  015 ( M = 0115 )
^H = bs =  010 ( H = 0110 )

Although, if you interpret the convention to mean invert-bit-7
then it fits:    ? = 0077  |  ^? = 0177


While ASCII character codes for delete (^?) and backspace (^H) are pretty universal,
the *meaning* of those codes to an editor or some other software are not.
Some editors like to interpret backspace as delete-char-before- cursor, and
delete as delete-character-at-(or-before)-cursor.


'stty erase' sets the terminal drivers semantic mapping of which key is the
one to remove a mistyped character.


-- Steve M.

It's also quite likely that some other things (which you may or may not use) now do not work as designed anymore because they actually expected the other code.


Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-userlevel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-userlevel/sdm7g% 40mac.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-userlevel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-userlevel/email@hidden

This email sent to email@hidden
References: 
 >Re: Darwin-userlevel Digest, Vol 4, Issue 14 (From: "Oscar Pitts" <email@hidden>)
 >Re: shell annoyances (From: Kasey Speakman <email@hidden>)
 >Re: shell annoyances (From: Jonas Maebe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.