diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-10 18:34:50 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-10 18:34:50 +1000 |
commit | fa8959532ba3d3b0846dc3fb9f55ccbf4e6655ec (patch) | |
tree | c07061b6dbd27ce14fa3c8ba2f8d8ca5dee2fdf0 | |
parent | Merge pull request #2810 from RyanDwyer/fix-docs-backandforth (diff) | |
download | sway-fa8959532ba3d3b0846dc3fb9f55ccbf4e6655ec.tar.gz sway-fa8959532ba3d3b0846dc3fb9f55ccbf4e6655ec.tar.zst sway-fa8959532ba3d3b0846dc3fb9f55ccbf4e6655ec.zip |
Fix program name in version strings
When running swaymsg -v, the version returned is actually the version of
swaymsg itself, yet the message displayed was "sway version <version>".
This can create confusion if users update sway and swaymsg but don't
restart sway, then use swaymsg to check the version.
This patch changes the wording to be "swaymsg version <version>"
instead, and likewise for swaybar.
To get the version of a running sway instance, users should run swaymsg
-t get_version.
-rw-r--r-- | swaybar/main.c | 2 | ||||
-rw-r--r-- | swaymsg/main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index d2c579db..db204f4a 100644 --- a/swaybar/main.c +++ b/swaybar/main.c | |||
@@ -62,7 +62,7 @@ int main(int argc, char **argv) { | |||
62 | bar_id = strdup(optarg); | 62 | bar_id = strdup(optarg); |
63 | break; | 63 | break; |
64 | case 'v': | 64 | case 'v': |
65 | fprintf(stdout, "sway version " SWAY_VERSION "\n"); | 65 | fprintf(stdout, "swaybar version " SWAY_VERSION "\n"); |
66 | exit(EXIT_SUCCESS); | 66 | exit(EXIT_SUCCESS); |
67 | break; | 67 | break; |
68 | case 'd': // Debug | 68 | case 'd': // Debug |
diff --git a/swaymsg/main.c b/swaymsg/main.c index 3767daf3..4688737c 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -345,7 +345,7 @@ int main(int argc, char **argv) { | |||
345 | cmdtype = strdup(optarg); | 345 | cmdtype = strdup(optarg); |
346 | break; | 346 | break; |
347 | case 'v': | 347 | case 'v': |
348 | fprintf(stdout, "sway version " SWAY_VERSION "\n"); | 348 | fprintf(stdout, "swaymsg version " SWAY_VERSION "\n"); |
349 | exit(EXIT_SUCCESS); | 349 | exit(EXIT_SUCCESS); |
350 | break; | 350 | break; |
351 | default: | 351 | default: |