aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdmenu-filepicker5
1 files changed, 3 insertions, 2 deletions
diff --git a/dmenu-filepicker b/dmenu-filepicker
index 27654f8..547f2b5 100755
--- a/dmenu-filepicker
+++ b/dmenu-filepicker
@@ -13,8 +13,9 @@ while true; do
13 if [ "$sel" = "." ]; then 13 if [ "$sel" = "." ]; then
14 echo "$fullpath" | sed 's|/\.||' 14 echo "$fullpath" | sed 's|/\.||'
15 break 15 break
16 elif [ -d "$fullpath" ]; then 16 elif [ -d "$fullpath" ] || [ -z "$fullpath" ]; then
17 sel=$(ls -a "$fullpath" | sed 's|.*/||' | $menu $menuopts) 17 if [ -z "$fullpath" ]; then fp="/"; else fp="$fullpath"; fi
18 sel=$(ls -a "$fp" | sed 's|.*/||' | $menu $menuopts)
18 if [ "$sel" = ".." ]; then 19 if [ "$sel" = ".." ]; then
19 fullpath=$(echo "$fullpath" | sed "s|/[^/]*$||") 20 fullpath=$(echo "$fullpath" | sed "s|/[^/]*$||")
20 else 21 else

Generated with cgit - Back to sebastiano.tronto.net