summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-12-18 04:22:00 +0100
committerMarcel Holtmann <marcel@holtmann.org>2012-12-18 04:22:00 +0100
commit567681086f49e6e1c7426d46592d3e15a462ef0a (patch)
treee3a434083a5de37aae876c91cb749e784e900d9f /client
parent5557e7b453d9f14b67462e3072517cf971a4b51e (diff)
client: Forward input to agent handling if needed
Diffstat (limited to 'client')
-rw-r--r--client/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/main.c b/client/main.c
index 7f4bbd1a7..c63e84995 100644
--- a/client/main.c
+++ b/client/main.c
@@ -829,6 +829,11 @@ static char **cmd_completion(const char *text, int start, int end)
{
char **matches = NULL;
+ if (agent_completion() == TRUE) {
+ rl_attempted_completion_over = 1;
+ return NULL;
+ }
+
if (start > 0) {
int i;
@@ -860,6 +865,9 @@ static void rl_handler(char *input)
char *cmd, *arg;
int i;
+ if (agent_input(dbus_conn, input) == TRUE)
+ goto done;
+
if (!input) {
rl_insert_text("quit");
rl_redisplay();