X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=client.c;h=f1100df49e144b873779ca84d226c1829cb1c1a3;hp=3e9219fd9226a1f1f37c5010e0237b982da9c59d;hb=refs%2Fheads%2Fmaint;hpb=d31995b3074bb19aa4da66ce5c4774ca9ed101a1 diff --git a/client.c b/client.c index 3e9219fd..3edaab5d 100644 --- a/client.c +++ b/client.c @@ -100,7 +100,7 @@ static int create_merged_lpr(const char *line) /* * The original lpr for the interactive session has no non-option * arguments. We create a fresh lpr from the words in "line" and merge - * it with the orignal lpr. + * it with the original lpr. */ ret = lls(lls_parse(argc, argv, cmd, &argv_lpr, &errctx)); free_argv(argv); @@ -248,9 +248,15 @@ I9E_DUMMY_COMPLETER(tasks); static struct i9e_completer completers[]; static void help_completer(struct i9e_completion_info *ci, - struct i9e_completion_result *result) + struct i9e_completion_result *cr) { - result->matches = i9e_complete_commands(ci->word, completers); + char *opts[] = {LSG_SERVER_CMD_HELP_OPTS, NULL}; + + if (ci->word[0] == '-') { + i9e_complete_option(opts, ci, cr); + return; + } + cr->matches = i9e_complete_commands(ci->word, completers); } static void stat_completer(struct i9e_completion_info *ci, @@ -618,7 +624,7 @@ int main(int argc, char *argv[]) { int ret; - init_random_seed_or_die(); + crypt_init(); sched.default_timeout.tv_sec = 1; ret = client_parse_config(argc, argv, &ct, &client_loglevel); @@ -664,6 +670,7 @@ int main(int argc, char *argv[]) } } sched_shutdown(&sched); + crypt_shutdown(); out: if (ret < 0) PARA_ERROR_LOG("%s\n", para_strerror(-ret));