adds command alias 'cat' for 'get -o -'

Tue, 26 Feb 2019 10:17:19 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 26 Feb 2019 10:17:19 +0100
changeset 511
59a216f8d4e8
parent 510
d6e801f97e7a
child 512
3320a015a3bc

adds command alias 'cat' for 'get -o -'

dav/main.c file | annotate | diff | comparison | revisions
--- a/dav/main.c	Sun Feb 24 17:35:18 2019 +0100
+++ b/dav/main.c	Tue Feb 26 10:17:19 2019 +0100
@@ -108,6 +108,9 @@
             ret = cmd_list(args);
         } else if(!strcasecmp(cmd, "get")) {
             ret = cmd_get(args, FALSE);
+        } else if(!strcasecmp(cmd, "cat")) {
+            ucx_map_cstr_put(args->options, "output", "-");
+            ret = cmd_get(args, FALSE);
         } else if(!strcasecmp(cmd, "put")) {
             ret = cmd_put(args, FALSE);
         } else if(
@@ -253,7 +256,9 @@
             break;
         }
         fprintf(stderr, "        %s\n", str);
-    }   
+    }
+    fprintf(stderr, "\nCommand Aliases:\n");
+    fprintf(stderr, "        cat        get -o -\n");
     fprintf(stderr, "\n");
     fprintf(stderr, "Options:\n");
     fprintf(stderr,

mercurial