#!/usr/bin/env fish if test (count $argv) -lt 1 echo "Usage: tsopen.fish %{full-path}" echo "See also https://github.com/transmission-remote-gtk/transmission-remote-gtk/wiki/Local-Command-usage" else for fullpath in $argv set dir (mktemp -d) sshfs archpi.rlyeh:$fullpath $dir; or notify-send tsopen.fish "failed to ssh"; and exit open $dir end end # this script could be improved by mounting the torrent by their hashid # this way an existing mount can be reused