summaryrefslogtreecommitdiff
path: root/scripts/old/dmenu-filepicker-old
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/old/dmenu-filepicker-old')
-rwxr-xr-xscripts/old/dmenu-filepicker-old31
1 files changed, 0 insertions, 31 deletions
diff --git a/scripts/old/dmenu-filepicker-old b/scripts/old/dmenu-filepicker-old
deleted file mode 100755
index 532fb82..0000000
--- a/scripts/old/dmenu-filepicker-old
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/bin/sh
2
3# A dmenu-based file picker (prints selected file to stdout)
4# Requires: dmenu (or similar)
5# Usage: dmenu-filepicker [path]
6
7menu=${MENU:-dmenu}
8menuopts="-i -l 15"
9
10basedir="$(pwd)"
11
12next="${@:-$(pwd)}"
13
14while true; do
15 if [ -z "$next" ]; then
16 break
17 elif [ "$next" = "." ]; then
18 pwd
19 break
20 elif [ -d "$next" ]; then
21 cd "$next"
22 next=$(ls -a | $menu $menuopts)
23 else
24 echo "$next" | while read line; do
25 echo "$(pwd)/$line"
26 done
27 break
28 fi
29done
30
31cd "$basedir"

Generated with cgit - Back to sebastiano.tronto.net