summaryrefslogtreecommitdiff
path: root/bin/menuscripts/tsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-17 00:29:32 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-06-17 00:29:32 +0200
commit84dc4d81c70af431c786b5080307d6bb87a0162e (patch)
tree6071359188189c7d0dbf07e176df9db3eef86121 /bin/menuscripts/tsh
parent2dab2233ef9cb54a3878e0120016d542045c7ee8 (diff)
checkpoint
Diffstat (limited to 'bin/menuscripts/tsh')
-rwxr-xr-xbin/menuscripts/tsh11
1 files changed, 2 insertions, 9 deletions
diff --git a/bin/menuscripts/tsh b/bin/menuscripts/tsh
index 70e7ca8..0c57ee0 100755
--- a/bin/menuscripts/tsh
+++ b/bin/menuscripts/tsh
@@ -121,14 +121,6 @@ show_files()
rm -f "$tmp"/.torrent
}
-# Select a type after having displayed them with 'show_types'
-select_type()
-{
- for type in $categories
- do printf "%s\n" "$type"
- done | fzf
-}
-
trap "exit 1" INT
trap "cleanup" EXIT
@@ -205,7 +197,8 @@ do
if [ "$noaskdownload" ] || confirm 'download?'
then
- [ "${category:-$(select_type)}" ] || exit 1
+ [ "$category" ] || category="$(printf '%s' "$categories" | tr ' ' '\n' | fzf)"
+ [ "$category" ] || exit 2
transmission-remote debuc.com -a "$magnet" -w "/downloads/$category"
elif confirm "copy?"
then