From 7218c4f9621be819813a43327e22588c4d551061 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Wed, 28 Aug 2019 16:52:50 +0100 Subject: imv: Warn about legacy bind syntax --- src/imv.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/imv.c b/src/imv.c index acdb39f..4aa167a 100644 --- a/src/imv.c +++ b/src/imv.c @@ -1,6 +1,7 @@ #include "imv.h" #include +#include #include #include #include @@ -237,11 +238,33 @@ static void split_commands(const char *start, const char **out, size_t *len) *len = str - start; } +static bool is_legacy_bind(const char *keys) +{ + const char *prefix = "') { + return true; + } + + return false; +} + static bool add_bind(struct imv *imv, const char *keys, const char *commands) { + if (is_legacy_bind(keys)) { + imv_log(IMV_WARNING, "'%s' is the legacy bind syntax.\n" + " would now be .\n" + "Check the imv(5) man page for more syntax examples.\n", keys); + return true; + } + struct list *list = imv_bind_parse_keys(keys); if (!list) { - imv_log(IMV_ERROR, "Invalid key combination"); + imv_log(IMV_ERROR, "Invalid key combination\n"); return false; } -- cgit v1.2.3