Revert "Escape sent commands"

This reverts commit 37c71cfe15.
This commit is contained in:
Nicolas Viennot 2016-03-27 23:33:39 -04:00
parent 78305a7077
commit c88870b0a3

View File

@ -177,34 +177,20 @@ args_print(struct args *args)
args_print_add(&buf, &len, " -%c ", entry->flag);
else
args_print_add(&buf, &len, "-%c ", entry->flag);
#ifdef TMATE
if (strchr(entry->value, '\'') != NULL)
args_print_add(&buf, &len, "\"%s\"", entry->value);
else
args_print_add(&buf, &len, "'%s'", entry->value);
#else
if (strchr(entry->value, ' ') != NULL)
args_print_add(&buf, &len, "\"%s\"", entry->value);
else
args_print_add(&buf, &len, "%s", entry->value);
#endif
}
/* And finally the argument vector. */
for (i = 0; i < args->argc; i++) {
if (*buf != '\0')
args_print_add(&buf, &len, " ");
#ifdef TMATE
if (strchr(args->argv[i], '\'') != NULL)
args_print_add(&buf, &len, "\"%s\"", args->argv[i]);
else
args_print_add(&buf, &len, "'%s'", args->argv[i]);
#else
if (strchr(args->argv[i], ' ') != NULL)
args_print_add(&buf, &len, "\"%s\"", args->argv[i]);
else
args_print_add(&buf, &len, "%s", args->argv[i]);
#endif
}
return (buf);