From 314b6138d7b8ba0108455851cda119205e21a400 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Tue, 29 May 2012 16:16:58 +0200 Subject: [PATCH] Add preliminary(Torrent ID/name only) autcompletion to manage command --- deluge/ui/console/commands/manage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deluge/ui/console/commands/manage.py b/deluge/ui/console/commands/manage.py index b9b46f165..cd9c5fa41 100644 --- a/deluge/ui/console/commands/manage.py +++ b/deluge/ui/console/commands/manage.py @@ -44,6 +44,8 @@ from deluge.log import LOG as log from optparse import make_option +import re + torrent_options = { "max_download_speed": float, "max_upload_speed": float, @@ -132,3 +134,7 @@ class Command(BaseCommand): self.console.write("Setting %s to %s for torrents %s.." % (key, val, torrent_ids)) client.core.set_torrent_options(torrent_ids, {key: val}).addCallback(on_set_config) return deferred + + def complete(self, line): + # We use the ConsoleUI torrent tab complete method + return component.get("ConsoleUI").tab_complete_torrent(line) \ No newline at end of file