From 8ae889c9b544b234caf68327f03e34be6e027feb Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Fri, 7 Feb 2020 00:42:20 +0100 Subject: [PATCH] places fix for dirs with spaces --- bin/places | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/places b/bin/places index dae0a40..88ba7ac 100755 --- a/bin/places +++ b/bin/places @@ -11,22 +11,22 @@ path=${path%/} test -d "$path" || { echo "$0: '$path' is not a directory" >&2 ; exit 1 ; } -for i in $path/* +for i in "$path"/* do test -e "$i" || continue shortname=${i##*/} if test -d "$i" then directories_menu="${directories_menu} -${shortname},^pipe(places '${path}/${shortname}')" +${shortname},^pipe(places \"${path}/${shortname}\")" else files_menu="$files_menu -${shortname},${JGMENU_RESOURCE_OPENER} ${path}/${shortname}" +${shortname},${JGMENU_RESOURCE_OPENER} \"${path}/${shortname}\"" fi done printf "%b\n" "^sep(${path})" -printf "%b\n" "  Otwórz w menadżerze plików,${JGMENU_RESOURCE_OPENER} ${path}" -printf "%b\n" "  Otwórz w termianlu,terminator --working-directory=${path}" +printf "%b\n" "  Otwórz w menadżerze plików,${JGMENU_RESOURCE_OPENER} \"${path}\"" +printf "%b\n" "  Otwórz w termianlu,terminator --working-directory=\"${path}\"" printf "%b\n" "^sep()" #printf "%b\n" "^sep(Katalogi)" printf "%b\n" "${directories_menu}"