diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-07 21:49:11 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-07 21:49:11 +0200 |
commit | a4062924109b74635d7deacd304f18675e4038d8 (patch) | |
tree | 6f9d31d688dd68d58be1bdfdf8a3ce9142f436e9 | |
parent | 43a4ad52a02dd5d1f3b564f2d2989c28c61c888e (diff) | |
download | tterm-a4062924109b74635d7deacd304f18675e4038d8.tar.gz |
Handle fg naively
It won't work properly at all if you run some other command
in-between.
The only way to properly handle this is on the shell side.
-rw-r--r-- | tterm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -121,7 +121,8 @@ main(int argc, char *argv[]) XFlush(display); } else if (strncmp(line, "cmd", 3) == 0) { line += 3; line[len-4] = 0; /* chomp */ - snprintf(cmd, MAX_CMD, "%s (%s)", line, cwd); + if (strncmp(line, "fg", 2) != 0) + snprintf(cmd, MAX_CMD, "%s (%s)", line, cwd); XStoreName(display, w, cmd); XFlush(display); } else { |