aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-12-08 19:06:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-12-08 19:06:22 +0000
commit0263a152d490c4120f76ae5447a114b30a43e6c8 (patch)
treede5c1ef01c33064df7c6dfac6505af98ddbf3e7f /client.c
parentchangelog: DECSET 27127 - modifies Esc to send \E[27127~ instead of \E (diff)
parentinstall: simplify sentence (diff)
Merge branch 'input-method-editor'
Closes #134
Diffstat (limited to 'client.c')
-rw-r--r--client.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/client.c b/client.c
index 9887c514..58a500eb 100644
--- a/client.c
+++ b/client.c
@@ -16,6 +16,7 @@
#define LOG_ENABLE_DBG 0
#include "log.h"
#include "client-protocol.h"
+#include "foot-features.h"
#include "version.h"
#include "xmalloc.h"
@@ -27,6 +28,15 @@ sig_handler(int signo)
aborted = 1;
}
+static const char *
+version_and_features(void)
+{
+ static char buf[256];
+ snprintf(buf, sizeof(buf), "version: %s %cime",
+ FOOT_VERSION, feature_ime() ? '+' : '-');
+ return buf;
+}
+
static void
print_usage(const char *prog_name)
{
@@ -155,7 +165,7 @@ main(int argc, char *const *argv)
break;
case 'v':
- printf("footclient version %s\n", FOOT_VERSION);
+ printf("footclient %s\n", version_and_features());
return EXIT_SUCCESS;
case 'h':