Merge branch 'maint'
[paraslash.git] / client.c
index 35b49a168d5b0d680603e087ed7e6bcf3d309d9e..f1100df49e144b873779ca84d226c1829cb1c1a3 100644 (file)
--- 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;
@@ -204,7 +205,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 +218,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)
 {
@@ -272,7 +279,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);
@@ -317,11 +324,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,