diff options
Diffstat (limited to 'dmenu-filepicker')
| -rwxr-xr-x | dmenu-filepicker | 6 |
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 |
