Opened 7 months ago

Last modified 7 months ago

#3217 new feature-request

deluge-console does not easily support alternative connections for interactive sessions

Reported by: nayfield Owned by:
Priority: minor Milestone: 1.3.16
Component: Console UI Version: 1.3-stable
Keywords: Cc:

Description

when using deluge-console for non-default connections (different port/host, user/pass required) a common convention for non-interactive commands is to provide arguments such as:

$ deluge-console "connect 127.0.0.1:<altport> ; info ; quit"

However, there is no easy way to script an interactive console session for an alternative connection; it requires the user to type in the connect details after the console starts.

Currently, the following command connects but immediately exits:

$ deluge-console "connect 127.0.0.1<altport>"

This feature request is to act differently for the example command above. Specifically: when 'connect' is the only command provided in arguments, remain in interactive mode and connect as instructed. Do not change behavior for any other combination of arguments except single command argument.

Attachments (1)

deluge-conn.patch (1.4 KB) - added by nayfield 7 months ago.
Minimal patch to implement feature request

Download all attachments as: .zip

Change History (2)

Changed 7 months ago by nayfield

Minimal patch to implement feature request

comment:1 Changed 7 months ago by nayfield

The attached patch (Against 1.3-stable) is a minimal implementation of this feature request.

It has been tested locally for a few use cases - no args, "connect <parameters>" , "connect; info ; quit", "info; quit".

As expected the only behavior change with the patch is in the requested feature of connect as the only arg.

If this is accepted, the code can be further optimized within the "if args:" block (including moving the help test up there). I did not do this to make the proposed change clear.

Note: See TracTickets for help on using tickets.