Non-breaking space is easy to write accidentally and impossible or hard to distinguish from regular space.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNOME Terminal |
New
|
Undecided
|
Unassigned | ||
Geany |
New
|
Undecided
|
Unassigned | ||
gedit |
New
|
Undecided
|
Unassigned | ||
nano |
New
|
Undecided
|
Unassigned | ||
xfce4-terminal |
New
|
Undecided
|
Unassigned | ||
xkeyboard-config (Ubuntu) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
OS: from Hardy to at least Bionic.
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).
$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
Besides it may be hard to see the typing error, as non-breaking space character looks exactly same as regular space character.
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.
WORKAROUNDS:
Run
setxkbmap -option "nbsp:none"
to make <Alt Gr><space> type regular space character.
Even better option is to use "classic", "mac" or "nodeadkeys" keyboard variant instead of "". This could be set up in /etc/default/
Non-breaking space can still be typed (in GTK apps) by <Ctrl><Shift>u 00a0<Enter>, if needed. Another option is to use compose key: <compose> <space> <space>.
In Bash scripts you could also use `printf '\u00a0'` or `printf '\xc2\xa0'` to print a non-breaking space. (You could use `echo -en` instead of `printf`.) Or you could set up a variable `readonly nbsp=$'\u00a0'`.
Yet another workaround would be to use a font that displays regular space and non-breaking space differently, but is there one?
description: | updated |
Changed in xorg: | |
status: | Incomplete → New |
Changed in xorg: | |
status: | New → Confirmed |
description: | updated |
summary: |
- [Hardy] Whitespace in command line not always regural whitespace + Non-breaking space is easy to write accidentally and hard to distinguish + from regular space. |
description: | updated |
summary: |
- Non-breaking space is easy to write accidentally and impossible to - distinguish from regular space. + Non-breaking space is easy to write accidentally and impossible or hard + to distinguish from regular space. |
description: | updated |
description: | updated |
Is there possibility that hard disk is working unreliably? Is there a way to check the drive? It has ext3 filesystem.