aboutsummaryrefslogtreecommitdiff
path: root/dmenu-filepicker
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2022-02-13 15:21:58 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2022-02-13 15:21:58 +0100
commitf9b7d81af1e92a07d6da04e8f3d8af36c566722b (patch)
tree6076747ea7a3c12e7e7178120276b160664b2f6b /dmenu-filepicker
parent1e830ae3dc0f01779a6cc24451e2907006ba6d1d (diff)
downloadscripts-f9b7d81af1e92a07d6da04e8f3d8af36c566722b.tar.gz
scripts-f9b7d81af1e92a07d6da04e8f3d8af36c566722b.zip
Fixed selecting previous folder (..)
Diffstat (limited to 'dmenu-filepicker')
-rwxr-xr-xdmenu-filepicker6
1 files changed, 5 insertions, 1 deletions
diff --git a/dmenu-filepicker b/dmenu-filepicker
index 15d7e40..27654f8 100755
--- a/dmenu-filepicker
+++ b/dmenu-filepicker
@@ -15,7 +15,11 @@ while true; do
15 break 15 break
16 elif [ -d "$fullpath" ]; then 16 elif [ -d "$fullpath" ]; then
17 sel=$(ls -a "$fullpath" | sed 's|.*/||' | $menu $menuopts) 17 sel=$(ls -a "$fullpath" | sed 's|.*/||' | $menu $menuopts)
18 fullpath=$(echo "$sel" | sed "s|^|$fullpath/|") 18 if [ "$sel" = ".." ]; then
19 fullpath=$(echo "$fullpath" | sed "s|/[^/]*$||")
20 else
21 fullpath=$(echo "$sel" | sed "s|^|$fullpath/|")
22 fi
19 else 23 else
20 echo "$fullpath" 24 echo "$fullpath"
21 break 25 break

Generated with cgit - Back to sebastiano.tronto.net