X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=client.c;h=31cfff09798b2089e2b815a544fd207464f0e76c;hp=f53147f1c8d6f1ae03cac62496c6fcf1aae65847;hb=a13a1e0d202a8969374b9a70562556e689597f2d;hpb=32a81d7eecfa5c8585d7095631ff2cd8b7b1bf7a diff --git a/client.c b/client.c index f53147f1..31cfff09 100644 --- a/client.c +++ b/client.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2014 Andre Noll + * Copyright (C) 1997 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -204,7 +204,6 @@ I9E_DUMMY_COMPLETER(pause); I9E_DUMMY_COMPLETER(play); I9E_DUMMY_COMPLETER(si); I9E_DUMMY_COMPLETER(term); -I9E_DUMMY_COMPLETER(version); I9E_DUMMY_COMPLETER(stop); I9E_DUMMY_COMPLETER(addatt); I9E_DUMMY_COMPLETER(init); @@ -218,6 +217,13 @@ static void help_completer(struct i9e_completion_info *ci, result->matches = i9e_complete_commands(ci->word, completers); } +static void version_completer(struct i9e_completion_info *ci, + struct i9e_completion_result *cr) +{ + char *opts[] = {"-v", NULL}; + i9e_complete_option(opts, ci, cr); +} + static void stat_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { @@ -270,9 +276,9 @@ static void ls_completer(struct i9e_completion_info *ci, struct i9e_completion_result *cr) { char *opts[] = { - "--", "-l", "-ls", "-ll", "-lv", "-lp", "-lm", "-lc", "-p", - "-a", "-r", "-d", "-sp", "-sl", "-ss", "-sn", "-sf", "-sc", - "-si", "-sy", "-sb", "-sd", "-sa", NULL + "--", "-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 }; if (ci->word[0] == '-') i9e_complete_option(opts, ci, cr); @@ -317,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,