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: Can't type square brackets in BASH



Chet Ramey wrote:
Tron Thomas wrote:
I am running Mac OS X 10.4.7. I have two systems, a PowerMac and an
iBook. I've just recently discovered that I can no longer type square
brackets "[]" in the Terminal application when I'm at the BASH prompt. If I run something like the Python interpreter I can type brackets. Once I go back to BASH brackets are again refused. Attempts to copy and
paste do not work. The left bracket gets stripped from the paste
operation.


What is causing this behavior and how can I eliminate it?

It looks like you've bound `[' and ']' to readline functions other than self-insert. Look at ~/.inputrc for the key bindings. `stty -a' might also provide clues.

Chet
Here is what is contained in my .inputrc file:
"[5D": backward-word
"[5C": forward-word

"[1~": beginning-of-line
"[4~": end-of-line

"[3~": delete-char

"[B": history-search-forward
"[A": history-search-backward
"[5~": history-search-backward
"[6~": history-search-forward

Here is the output from executing stty -a:
speed 9600 baud; 50 rows; 160 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
   -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
   -extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
   brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
   -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
   eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
   min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
   stop = ^S; susp = ^Z; time = 0; werase = ^W;

I can't tell from either output if the brackets are bound to non self-insert readline functions.
How useful is this information in determining the cause of the problem?


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

This email sent to email@hidden
References: 
 >Can't type square brackets in BASH (From: Tron Thomas <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.