Wrong alignment in select lists

2010-05-31 Thread Bernd Eggink
Select lists are sometimes displayed with incorrect vertical alignment 
if an item contains one or more German umlauts. Examples:


select x in äöü blah{1..20}; do :; done # wrong
select x in amöbe blah{1..20}; do :; done   # wrong
select x in amöb blah{1..20}; do :; done# wrong
select x in amö blah{1..20}; do :; done # OK

Bash version is 4.1.7(1)-release, LANG is de_DE.UTF-8.

Bernd

--
Bernd Eggink
http://sudrala.de



Re: Weird behaviour of 'hash' builtin

2010-05-31 Thread Chet Ramey
On 5/30/10 4:22 AM, Jan Schampera wrote:

> If this is not a bug, what's the reason behind this? Is it to blindly
> report success when an operand "looks like a pathname"?

`hash' ignores operands with slashes.  It just doesn't consider them at
all.  They don't get into the hash table and they don't contribute to the
success or failure of the command.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: Wrong alignment in select lists

2010-05-31 Thread Jan Schampera

Bernd Eggink wrote:

Select lists are sometimes displayed with incorrect vertical alignment 
if an item contains one or more German umlauts. Examples:


select x in äöü blah{1..20}; do :; done# wrong
select x in amöbe blah{1..20}; do :; done# wrong
select x in amöb blah{1..20}; do :; done# wrong
select x in amö blah{1..20}; do :; done# OK

Bash version is 4.1.7(1)-release, LANG is de_DE.UTF-8.

Bernd



It's long ago I since inspected the select code, but I think it's 
because it counts bytes for the space calculations. The last one 
succeeds because there's a minimum width reached.


J.