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 ; }
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(<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 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}"