bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What is the exact function of ${#prarmeter} syntax?


From: Eungkyu Song
Subject: What is the exact function of ${#prarmeter} syntax?
Date: Fri, 7 Jan 2005 15:52:22 +0900
User-agent: Mutt/1.5.6+20040907i

Before bash 3.0, I think that ${#parameter} is just "byte counter".
(byte means the 'char' type in C)
To display prompt one line, I used it as 'terminal column counter'

In EUC-KR encoding (Korean), number of byte and number of terminal column
are same and I have no complain abount that.

But bash 3.0 count the number of characters and wide character which
occupy 2 terminal column is just one character.

Man page said that ${#parameter} is 'the length in characters'.
How abount change this feature to count terminal column?
or please add the feature that count terminal column.
I really want it and maybe many wide character user want it, too.

ps) please cc me

-- 
 ___               _           Division of CS, Dept. of EECS in KAIST
| __|  _ _ _  __ _| |___  _ _  _                     Member of SPARCS
| _| || | ' `/ _` | / / || | || | http://sparcs.kaist.ac.kr/~eungkyu/
|___`_,_|_||_`__, |_`_``_, |`_,_| @sparcs.kaist.ac.kr
             |___/     |__/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]