xiterm

simple vte terminal emulator
git clone https://git.ce9e.org/xiterm.git

commit
564019ac656d9ceac9b16b14875934797d4f4a98
parent
a4619aeae3dc46df62ff7a2edbb981b68558b742
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-06-10 09:00
-c: quote arguments

Diffstat

M xiterm.c 3 ++-

1 files changed, 2 insertions, 1 deletions


diff --git a/xiterm.c b/xiterm.c

@@ -192,8 +192,9 @@ int main(int argc, char **argv) {
  192   192 			exit(EXIT_FAILURE);
  193   193 		}
  194   194 		for (i = 2; i < argc; i++) {
   -1   195 			strncat(command, "\"", 128 - 1 - strlen(command));
  195   196 			strncat(command, argv[i], 128 - 1 - strlen(command));
  196    -1 			strncat(command, " ", 128 - 1 - strlen(command));
   -1   197 			strncat(command, "\" ", 128 - 1 - strlen(command));
  197   198 		}
  198   199 		cmd[0] = "/bin/sh";
  199   200 		cmd[1] = "-c";