X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=client.c;h=40ae9bc87f432b3812182d44da7953052afb2a4b;hb=8843e506d1af0f71c61e2c301bea9b612187e360;hp=89171a23b7f0b22b1940e3e54e74d000d36f7245;hpb=38aeac398e716ff7ae6919acbdf498ed09ab0bc1;p=paraslash.git diff --git a/client.c b/client.c index 89171a23..40ae9bc8 100644 --- a/client.c +++ b/client.c @@ -95,8 +95,7 @@ static int execute_client_command(const char *cmd, char **result) struct exec_task exec_task = { .task = { .pre_select = exec_pre_select, - .new_post_select = exec_post_select, - .post_select = NULL, + .post_select = exec_post_select, .status = "client exec task", }, .result_buf = para_strdup(""), @@ -317,11 +316,7 @@ static void lsatt_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { char *opts[] = {"-i", "-l", "-r", NULL}; - - if (ci->word[0] == '-') - i9e_complete_option(opts, ci, cr); - else - complete_attributes(ci->word, &cr->matches); + i9e_complete_option(opts, ci, cr); } static void mvatt_completer(struct i9e_completion_info *ci, @@ -446,11 +441,9 @@ static int client_i9e_line_handler(char *line) int ret; client_disconnect(ct); - if (!line || !*line) - return 0; - PARA_DEBUG_LOG("line handler: %s\n", line); + PARA_DEBUG_LOG("line: %s\n", line); ret = make_client_argv(line); - if (ret < 0) + if (ret <= 0) return ret; ret = client_connect(ct, &sched, NULL, NULL); if (ret < 0) @@ -478,7 +471,7 @@ __noreturn static void interactive_session(void) .completers = completers, }; - PARA_NOTICE_LOG("\n%s\n", VERSION_TEXT("client")); + PARA_NOTICE_LOG("\n%s\n", version_text("client")); if (ct->conf.history_file_given) history_file = para_strdup(ct->conf.history_file_arg); else { @@ -549,8 +542,7 @@ static int supervisor_post_select(struct sched *s, __a_unused struct task *t) } static struct task svt = { - .new_post_select = supervisor_post_select, - .post_select = NULL, + .post_select = supervisor_post_select, .status = "supervisor task" };