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

Re: How come i wrote a NO-BREAK SPACE in xterm+bash ?



Hi

On Sun, 2015-08-02 at 10:54 +0200, Thomas Schmitt wrote:
> Hi,
> 
> i just had some interesting minutes with this riddle in bash
> on xterm:
> 
>   $ ls -l .. | wc
>   ls: cannot access .. : No such file or directory
> 
> The refusal sticks to the command in libreadline's history
> buffer and to copy+paste, but not to a manually retyped
> command:
> 
>   $ ls -l .. | wc
>      70     623    4159
> 
> Finally i found out that the refusing command line does not
> have an ASCII Blank (decimal 32) before the pipe symbol
> but rather UTF-8 code (194,160) which means U+00A0
> "NO-BREAK SPACE".
> Obviously this does not count as whitespace in bash (vanilla
> Debian 8.1 install). The error message had (194,160) between
> ".." and ":".
> 
> Now i riddle how my chair, my US-ASCII keyboard, and the
> problem inbetween managed to produce such a character
> in the bash (libreadline) command line of an xterm.
> 
> Does anybody have an idea how to reproduce this ?
> (In order to better avoid it.)

I can reproduce that with Alt-gr + space space (My Alt-Gr key is my
compose key):

karl@xps:~$ od -t u1
 
0000000 194 160  10
0000003

I suspect you may be able to do the same, although you may have
configured your compose key differently (I cannot remember whether mine
is the default).

Hope this helps

-- 
Karl E. Jørgensen


Reply to: