Re: help me with readline key binding problem

2007-01-22 Thread Oibane
Thank you, Andreas.
Teminal and tty are one of the most inaccesible part for a layman.
Now you've informed, I think I can devise a solution.

Best regards,
Oibane.




___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: nocaseglob

2007-01-22 Thread Bruce Korb

On 1/20/07, Bob Proulx <[EMAIL PROTECTED]> wrote:

I think you have the nocaseglob right.  I think this is a variable set
but not exported problem.  Just guessing though.


Excellent guess. No cigar, tho:

$ echo [a-z]*
bin bk-archives Bugzilla core cron Desktop [[...]]
$ LC_COLLATE=C echo [a-z]*
bin bk-archives Bugzilla core cron Desktop [[...]]
$ set | egrep '^L'
LESS=-eMagis
LIBDIR=/home/usr/bkorb/Linux-i686/lib
LINES=70
LOGNAME=bkorb
$ LC_COLLATE=C ; echo [a-z]*
bin bk-archives core cron [[...]]
$ echo $BASH_VERSION
3.1.17(1)-release


I hope that is your problem.  A set but not exported LC_COLLATE
variable.  Definitely easy to miss.


Yep.  That is easy to miss.  Nope.  That's not the problem.
Apparently you are _REQUIRED_ to export LC_COLLATE with the value "C".
That's just wrong.  Was that really intended?  (I confess to having been using
ksh until recently, so if this is a long standing tradition, I
wouldn't have noticed.)

Thanks for your help - Bruce


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: nocaseglob

2007-01-22 Thread Bob Proulx
Bruce Korb wrote:
> $ echo [a-z]*
> bin bk-archives Bugzilla core cron Desktop [[...]]
> $ LC_COLLATE=C echo [a-z]*
> bin bk-archives Bugzilla core cron Desktop [[...]]

Unfortunately in this case setting the variable on the command line
for that command won't do what you want.  Since file globbing takes
place in the shell and not for the command the setting of the variable
on-the-fly won't change the file globbing AFAIK.  So the above is not
a good test for this case.

Try these:

  (unset LC_ALL LC_COLLATE LANG ; echo [a-z]*)
  (LC_COLLATE=en_US.UTF-8 ; echo [a-z]*)
  (LC_COLLATE=C ; echo [a-z]*)

My results:

  $ (unset LC_ALL LC_COLLATE LANG ; echo [a-z]*)
  abc
  $ (LC_COLLATE=en_US.UTF-8 ; echo [a-z]*)
  abc DEF
  $ (LC_COLLATE=C ; echo [a-z]*)
  abc

> $ set | egrep '^L'
> LESS=-eMagis
> LIBDIR=/home/usr/bkorb/Linux-i686/lib
> LINES=70
> LOGNAME=bkorb

That looks pretty convincing by itself that these are not set in the
environment.

> $ LC_COLLATE=C ; echo [a-z]*
> bin bk-archives core cron [[...]]

Agreed.

> Apparently you are _REQUIRED_ to export LC_COLLATE with the value
> "C".  That's just wrong.  Was that really intended?  (I confess to
> having been using ksh until recently, so if this is a long standing
> tradition, I wouldn't have noticed.)

I do not see that behavior here.  I am using the stock bash
distributed by Debian.

At this point I suggest getting the sources and compiling up a
pristine copy of bash.  It could be there is a patch applied that is
affecting this behavior.  I don't think this behavior that you are
seeing is intended and I cannot replicate the it.  You might be
chasing a patch bug.

Bob


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: nocaseglob

2007-01-22 Thread Bruce Korb

On 1/22/07, Bob Proulx <[EMAIL PROTECTED]> wrote:

Unfortunately in this case setting the variable on the command line
for that command won't do what you want.  Since file globbing takes

I figured that out.  :}


  (unset LC_ALL LC_COLLATE LANG ; echo [a-z]*)
  (LC_COLLATE=en_US.UTF-8 ; echo [a-z]*)
  (LC_COLLATE=C ; echo [a-z]*)


$ echo [a-z]*
bin bk-archives Bugzilla core cron Desktop docs [[...]]
$ export LC_COLLATE=C
/home/usr/bkorb
$ echo [a-z]*
bin bk-archives core cron docs [[...]]
$ unset LC_COLLATE
$ echo [a-z]*
bin bk-archives Bugzilla core cron Desktop docs [[...]]
$ echo [a-d]*
bin bk-archives Bugzilla core cron docs
$ echo [a-D]*
bin bk-archives Bugzilla core cron Desktop docs Downloads

OK.  I'm just going to set LC_COLLATE to "C" and not sweat it.
There seems to be something else aside from LC_ALL, LC_COLLATE
and LANG that affects collating sequence.  Notice the difference
between "[a-d]*" and "[a-D]*".  Whatever collating sequence is being used
do select files puts "D" after "d", though the actual sort puts them as being
equal.  Whatever.  I've gotten bored now. :)


I do not see that behavior here.  I am using the stock bash
distributed by Debian.


I get the behavior with the stock RedHat and (likely, though not certain)
stock Debian BASHes.  So, it seems clear: something aside from LANG,
LC_ALL and LC_COLLATE affects the collating sequence.

$ unset LANG LC_COLLATE LC_ALL
$ echo [a-D]*
bin bk-archives Bugzilla core cron Desktop docs Downloads


You might be chasing a patch bug.


Whatever it is, I have the workaround:  LC_COLLATE=C.
Thank you, Bob.

Regards, Bruce


___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash


Re: nocaseglob

2007-01-22 Thread Tim Waugh
On Mon, 2007-01-22 at 08:04 -0800, Bruce Korb wrote:
> There seems to be something else aside from LC_ALL, LC_COLLATE
> and LANG that affects collating sequence.  Notice the difference
> between "[a-d]*" and "[a-D]*".  Whatever collating sequence is being used
> do select files puts "D" after "d", though the actual sort puts them as being
> equal.  Whatever.  I've gotten bored now. :)

It's worth noting here that bash's globbing of '[A-Z]*' etc is
definitely different from the system collation sequence (i.e. using
fnmatch() or glob() functions).  There is an open bug report about this
here:

  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217359

Demo:

Steps to Reproduce:
1. touch h
2. sh -c 'LC_ALL=en_US; echo [A-Z]'
3. python -c 'from locale import *; import glob; setlocale(LC_ALL,"en_US");
print glob.glob("[A-Z]")'

Tim.
*/



signature.asc
Description: This is a digitally signed message part
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash