places fix for dirs with spaces

master
Daniel Napora 2020-02-07 00:42:20 +01:00
parent 8d79f5238a
commit 8ae889c9b5
1 changed files with 5 additions and 5 deletions

View File

@ -11,22 +11,22 @@ path=${path%/}
test -d "$path" || { echo "$0: '$path' is not a directory" >&2 ; exit 1 ; } test -d "$path" || { echo "$0: '$path' is not a directory" >&2 ; exit 1 ; }
for i in $path/* for i in "$path"/*
do do
test -e "$i" || continue test -e "$i" || continue
shortname=${i##*/} shortname=${i##*/}
if test -d "$i" if test -d "$i"
then then
directories_menu="${directories_menu} directories_menu="${directories_menu}
${shortname},^pipe(places '${path}/${shortname}')" ${shortname},^pipe(places \"${path}/${shortname}\")"
else else
files_menu="$files_menu files_menu="$files_menu
${shortname},${JGMENU_RESOURCE_OPENER} ${path}/${shortname}" ${shortname},${JGMENU_RESOURCE_OPENER} \"${path}/${shortname}\""
fi fi
done done
printf "%b\n" "^sep(<small><i>${path}</i></small>)" printf "%b\n" "^sep(<small><i>${path}</i></small>)"
printf "%b\n" "  Otwórz w menadżerze plików,${JGMENU_RESOURCE_OPENER} ${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 termianlu,terminator --working-directory=\"${path}\""
printf "%b\n" "^sep()" printf "%b\n" "^sep()"
#printf "%b\n" "^sep(Katalogi)" #printf "%b\n" "^sep(Katalogi)"
printf "%b\n" "${directories_menu}" printf "%b\n" "${directories_menu}"