filesel: list correctly files with spaces

Tue, 07 Nov 2017 12:29:28 +0100

author
David Demelier <markand@malikania.fr>
date
Tue, 07 Nov 2017 12:29:28 +0100
changeset 10
34563a7481c2
parent 9
cb9c1d42c201
child 11
416a0219249d

filesel: list correctly files with spaces

dmenu_filesel file | annotate | diff | comparison | revisions
--- a/dmenu_filesel	Tue Nov 07 12:04:08 2017 +0100
+++ b/dmenu_filesel	Tue Nov 07 12:29:28 2017 +0100
@@ -34,7 +34,7 @@
     if [ -n "$(ls -A ${root})" ]; then
         # TODO: Add some filters.
         for i in ${root}*; do
-            list="${list}$(basename ${i})\n"
+            list="${list}$(basename "${i}")\n"
         done
     fi
 

mercurial