diff options
Diffstat (limited to '')
| -rwxr-xr-x | sel | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -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 | ||
| 41 | remove() { | 41 | remove() { |
| @@ -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 |
