aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2022-01-14 20:09:45 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2022-01-14 20:09:45 +0100
commitb88e387692f87ccb3a2b6c56d2f4aa4cbf9e9917 (patch)
tree62de58768f647b436b037f372d6e437ecef1f5a8
parent8078747f2700f562070b9d2908ee473387313e47 (diff)
downloadscripts-b88e387692f87ccb3a2b6c56d2f4aa4cbf9e9917.tar.gz
scripts-b88e387692f87ccb3a2b6c56d2f4aa4cbf9e9917.zip
Fixed bug and added sel open command
-rwxr-xr-xsel11
1 files changed, 9 insertions, 2 deletions
diff --git a/sel b/sel
index fd8020f..f8845e2 100755
--- a/sel
+++ b/sel
@@ -9,9 +9,10 @@
9# cp: copy to current dir, possbily after editing filenames 9# cp: copy to current dir, possbily after editing filenames
10# edit: open selection in editor 10# edit: open selection in editor
11# mv: move to current dir, possbily after editing filenames 11# mv: move to current dir, possbily after editing filenames
12# open: open files using open-file
12# rm: remove selected files and clear selection 13# rm: remove selected files and clear selection
13 14
14# Requires: dmenu (or similar), trashrm (optional) 15# Requires: dmenu (or similar), trashrm (optional), open-file (for open only)
15 16
16# TODO: add possibility of specifying file. 17# TODO: add possibility of specifying file.
17# TODO 2: The usage of paste(1) is a bit of a hack, and for example it does 18# TODO 2: The usage of paste(1) is a bit of a hack, and for example it does
@@ -35,7 +36,6 @@ cphere() {
35 fnew=$(echo "$f" | sed 's/.*\t//') 36 fnew=$(echo "$f" | sed 's/.*\t//')
36 cp -R "$fold" ./"$fnew" 37 cp -R "$fold" ./"$fnew"
37 done 38 done
38 clear
39} 39}
40 40
41remove() { 41remove() {
@@ -80,6 +80,7 @@ case "$1" in
80 ;; 80 ;;
81 cp) 81 cp)
82 cphere 82 cphere
83 clear
83 ;; 84 ;;
84 edit) 85 edit)
85 $editor "$file" 86 $editor "$file"
@@ -87,6 +88,12 @@ case "$1" in
87 mv) 88 mv)
88 cphere 89 cphere
89 remove 90 remove
91 clear
92 ;;
93 open)
94 while read f; do
95 open-file "$f"
96 done < "$file"
90 ;; 97 ;;
91 rm) 98 rm)
92 remove 99 remove

Generated with cgit - Back to sebastiano.tronto.net