Skip to contentSkip to conversation

Wrong more(1) bash-completion on filenames with spaces

DISCUSSION Ángel González 2 participants 2 messages Jul 1, 2013 – Sep 30, 2013 Util-Linux package

lore
Share & tools
lore
#0 lore raw

The bash completion for more(1) treats the space-separated pieces of filenames as different files.

$ touch foo\ bar
$ more foo<TAB>
bar foo

Trying to hint the space doesn't help, either:
more foo\<TAB> → more foo\\
more foo\\<TAB> → more foo\\\\
more foo\\ <TAB> → more foo\\\

Workaround: Remove the bash completion and use the default one:

$ chmod a-r /usr/share/bash-completion/completions/more
maintainer
#1 lore raw
Quoted 6 lines · Ángel González

The bash completion for more(1) treats the space-separated pieces of filenames as different files.

$ touch foo\ bar
$ more foo<TAB>
bar foo

Fixed. Thanks!

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com