aboutsummaryrefslogtreecommitdiffstats
path: root/transmission-remote-cli
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-06-12 22:21:48 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-06-12 22:21:48 +0100
commite749e8f80d1edbf120bf76547cdf6a99c3fa8bb4 (patch)
treebe93df37a5d9297d514db245744107aa6b9f135b /transmission-remote-cli
parent9a0b25b00147e7746c08241dfd00bea349f406c8 (diff)
downloadtransmission-remote-cli-e749e8f80d1edbf120bf76547cdf6a99c3fa8bb4.tar.gz
Imported Upstream version 1.3.1upstream/1.3.1
Diffstat (limited to '')
-rwxr-xr-xtransmission-remote-cli (renamed from transmission-remote-cli.py)4
-rw-r--r--transmission-remote-cli-bash-completion.sh20
2 files changed, 18 insertions, 6 deletions
diff --git a/transmission-remote-cli.py b/transmission-remote-cli
index abcca78..d9896e1 100755
--- a/transmission-remote-cli.py
+++ b/transmission-remote-cli
@@ -16,7 +16,7 @@
# http://www.gnu.org/licenses/gpl-3.0.txt #
########################################################################
-VERSION = '1.3'
+VERSION = '1.3.1'
TRNSM_VERSION_MIN = '1.90'
TRNSM_VERSION_MAX = '2.52'
@@ -1613,7 +1613,7 @@ class Interface:
# terminal, so we have to catch this exception.
try:
self.pad.addstr(ypos, 0, title[0:bar_width].encode('utf-8'), tag_done)
- self.pad.addstr(ypos, bar_width, title[bar_width:].encode('utf-8'), tag)
+ self.pad.addstr(ypos, len_columns(title[0:bar_width]), title[bar_width:].encode('utf-8'), tag)
except:
pass
else:
diff --git a/transmission-remote-cli-bash-completion.sh b/transmission-remote-cli-bash-completion.sh
index 2a0cec6..53e7f36 100644
--- a/transmission-remote-cli-bash-completion.sh
+++ b/transmission-remote-cli-bash-completion.sh
@@ -1,17 +1,29 @@
#!/bin/bash
-_transmission-remote-cli.py () {
+_transmission-remote-cli () {
local cur prev opts
_get_comp_words_by_ref cur prev
- opts="--version -h --help -c --connect= -s --ssl -f --config= --create-config -n --netrc --debug"
+ opts="-h --help -v --version -c --connect -s --ssl -f --config --create-config -n --netrc --debug"
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
else
- _filedir torrent
+ case "${prev}" in
+ -c|--connect)
+ # no completion, wait for user input
+ ;;
+ -f|--config)
+ # dirs and files
+ _filedir
+ ;;
+ *)
+ # dirs and torrents
+ _filedir torrent
+ ;;
+ esac
fi
}
-complete -F _transmission-remote-cli.py transmission-remote-cli.py
+complete -F _transmission-remote-cli transmission-remote-cli