scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit f9b7d81af1e92a07d6da04e8f3d8af36c566722b
parent 1e830ae3dc0f01779a6cc24451e2907006ba6d1d
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sun, 13 Feb 2022 15:21:58 +0100

Fixed selecting previous folder (..)

Diffstat:
Mdmenu-filepicker | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dmenu-filepicker b/dmenu-filepicker @@ -15,7 +15,11 @@ while true; do break elif [ -d "$fullpath" ]; then sel=$(ls -a "$fullpath" | sed 's|.*/||' | $menu $menuopts) - fullpath=$(echo "$sel" | sed "s|^|$fullpath/|") + if [ "$sel" = ".." ]; then + fullpath=$(echo "$fullpath" | sed "s|/[^/]*$||") + else + fullpath=$(echo "$sel" | sed "s|^|$fullpath/|") + fi else echo "$fullpath" break