** Description changed:

- The following happen to me, if I still have Alt Gr key down when
- pressing space key (which happens easily):
+ OS: from Hardy to at least Trusty.
  
- E.g. grep does not work here (always):
+ When you use Finnish keyboard, you have to hold Alt Gr down to type | or
+ \ or certain other characters. When typing a shell command, you may
+ often want to enter a space character after such characters. But it
+ easily happens that Alt Gr is still down when you press space, and
+ consequently you type non-breaking space character U+00A0 (at least, if
+ you use UTF-8 keyboard layout, which is default in Ubuntu).
  
- $ cat /etc/X11/xorg.conf | grep device
- bash:  grep: command not found
- $ grep
- Usage: grep [OPTION]... PATTERN [FILE]...
- Try `grep --help' for more information.
+ $cd /tmp ; echo 0 > foo\ bar ; ls "foo bar"
+ ls: cannot access foo bar: No such file or directory
+ $cat foo bar | grep 0
+ No command ' grep' found, but there are 16 similar ones
+  grep: command not found
  
- Same thing with less command:
- $ lspci | less
- bash:  less: command not found
- $ less
- Missing filename ("less --help" for help)
+ Besides it may be hard to see the typing error, as non-breaking space
+ character looks exactly same as regular space character.
  
- I expect exactly same looking command lines work same way.
+ A way to avoid such typos would be to use another keyboard shortcut for
+ non-breaking space. Besides non-breaking space should look different
+ than regular space in terminal emulators and in editors.
+ 
+ A workaround in to run
+ setxkbmap -option "nbsp:none"
+ to make <Alt Gr><space> type regular space character,
+ and use `printf '\u00a0'` or `printf "\xc2\xa0"` to have a non-breaking space 
in scripts and in command line.
+ 
+ Non-breaking space can be typed (in GTK apps) by <Ctrl><Shift>u 00a0<Enter>, 
if needed, but it looks exactly like a regular space.
+ For me, <Super><Space> would be a good shortcut for non-breaking space.

** Summary changed:

- [Hardy] Whitespace in command line not always regural whitespace
+ Non-breaking space is easy to write accidentally and hard to distinguish from 
regular space.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/218637

Title:
  Non-breaking space is easy to write accidentally and hard to
  distinguish from regular space.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/218637/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to