From ec9d22a3062fa7a4acda70a50059df848474676e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 11 Nov 2016 14:53:20 +0100 Subject: vis: add `:set shell` option --- vis-cmds.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 16debea..e6ddeb0 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -150,6 +150,17 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor size_t opt_index = opt - options; switch (opt_index) { + case OPTION_SHELL: + { + char *shell = strdup(arg.s); + if (!shell) { + vis_info_show(vis, "Failed to change shell"); + return false; + } + free(vis->shell); + vis->shell = shell; + break; + } case OPTION_EXPANDTAB: vis->expandtab = arg.b; break; -- cgit v1.2.3