diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-06-12 22:21:49 +0100 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-06-12 22:21:49 +0100 |
commit | 8735a22d693ac0e2d2844b3287cb22ef77472efd (patch) | |
tree | 3acbcc1d1a2b2cb8cd2091bc0f48bc133ed572a7 /transmission-remote-cli-bash-completion.sh | |
parent | 3ee178de9868d8210ddf8e404ebd531a552677f5 (diff) | |
parent | e749e8f80d1edbf120bf76547cdf6a99c3fa8bb4 (diff) | |
download | transmission-remote-cli-8735a22d693ac0e2d2844b3287cb22ef77472efd.tar.gz |
Merge tag 'upstream/1.3.1'
Upstream version 1.3.1
Diffstat (limited to 'transmission-remote-cli-bash-completion.sh')
-rw-r--r-- | transmission-remote-cli-bash-completion.sh | 20 |
1 files changed, 16 insertions, 4 deletions
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 |