summaryrefslogtreecommitdiff
path: root/filebrowser/filebrow.sh
diff options
context:
space:
mode:
Diffstat (limited to 'filebrowser/filebrow.sh')
-rwxr-xr-xfilebrowser/filebrow.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/filebrowser/filebrow.sh b/filebrowser/filebrow.sh
new file mode 100755
index 0000000..ef6911a
--- /dev/null
+++ b/filebrowser/filebrow.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#give a list of files.
+#wait for a selection on stdin
+#cd or start that file
+#repeat.
+while true;do
+ echo
+ echo .* * | tr ' ' '\n'
+ read -r selection
+ if [ -f "$selection" ];then
+ xdg-open "$selection" #good enough?
+ fi
+ if [ -d "$selection" ];then
+ cd "$selection"
+ fi
+done