aboutsummaryrefslogtreecommitdiffstats
path: root/bash-completion/pivot_root
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2013-09-30 15:49:00 +0200
committerKarel Zak <kzak@redhat.com>2013-09-30 15:49:00 +0200
commitce3e6b15e2c4478b2df9a7016c168b16325abfb0 (patch)
tree8c85ee4225a6a6a4db7fac0b63445a021b826eb5 /bash-completion/pivot_root
parenta1e276ae1560dca9e985ca63f05fccb555d3f0d8 (diff)
downloadutil-linux-ce3e6b15e2c4478b2df9a7016c168b16325abfb0.tar.gz
bash-completion: use '\n' as IFS when ask for filenames
The bash completion for more(1) treats the space-separated pieces of filenames as different files. $ touch foo\ bar $ more foo<TAB> bar foo Reported-by: Ángel González <ingenit@zoho.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'bash-completion/pivot_root')
-rw-r--r--bash-completion/pivot_root1
1 files changed, 1 insertions, 0 deletions
diff --git a/bash-completion/pivot_root b/bash-completion/pivot_root
index 961c883748..95df4b4d2f 100644
--- a/bash-completion/pivot_root
+++ b/bash-completion/pivot_root
@@ -11,6 +11,7 @@ _pivot_root_module()
esac
case $COMP_CWORD in
1|2)
+ local IFS=$'\n'
compopt -o filenames
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
;;