X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=client.c;h=219cf2d8c1078a0e04e0ce00dd89420dd44264f4;hp=34cc9189bb2a1768765be83a5edaf5c0e2be7f5d;hb=fc8dfbb416ff07cca08fbf4e13efcaa25e17cc54;hpb=3804589a0c168ea799f47488f089232fa445dcd7 diff --git a/client.c b/client.c index 34cc9189..219cf2d8 100644 --- a/client.c +++ b/client.c @@ -22,7 +22,8 @@ #include "error.h" #include "version.h" -INIT_CLIENT_ERRLISTS; +/** Array of error strings. */ +DEFINE_PARA_ERRLIST; static struct sched sched; static struct client_task *ct; @@ -35,8 +36,7 @@ __printf_2_3 void (*para_log)(int, const char*, ...) = stderr_log; #ifdef HAVE_READLINE #include "interactive.h" -#include "server.completion.h" -#include "afs.completion.h" +#include "server_cmd.lsg.h" struct exec_task { struct task *task; @@ -278,7 +278,7 @@ static void ls_completer(struct i9e_completion_info *ci, char *opts[] = { "--", "-l", "-l=s", "-l=l", "-l=v", "-l=p", "-l=m", "-l=c", "-p", "-a", "-r", "-d", "-s=p", "-s=l", "-s=s", "-s=n", "-s=f", - "-s=c", "-s=i", "-s=y", "-s=b", "-s=d", "-s=a", NULL + "-s=c", "-s=i", "-s=y", "-s=b", "-s=d", "-s=a", "-F", "-b", NULL }; if (ci->word[0] == '-') i9e_complete_option(opts, ci, cr); @@ -323,11 +323,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, @@ -462,9 +458,12 @@ static int client_i9e_line_handler(char *line) return 1; } +I9E_DUMMY_COMPLETER(SUPERCOMMAND_UNAVAILABLE); static struct i9e_completer completers[] = { - SERVER_COMPLETERS - AFS_COMPLETERS +#define LSG_SERVER_CMD_CMD(_name) {.name = #_name, \ + .completer = _name ## _completer} + LSG_SERVER_CMD_COMMANDS +#undef LSG_SERVER_CMD_CMD {.name = NULL} };