summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-show-options.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-05-23 18:33:54 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-05-23 18:33:54 +0000
commita6b50d53034cadf73cdd7f3734a481006486f386 (patch)
tree85d0b441f00a27a2bef11a0a62b40231b900d813 /usr.bin/tmux/cmd-show-options.c
parent436798d3add4ef4c5d6581579a0dc8cdc0920d5e (diff)
Use the same argument escaping code for options as well.
Diffstat (limited to 'usr.bin/tmux/cmd-show-options.c')
-rw-r--r--usr.bin/tmux/cmd-show-options.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index 6a316dd2134..c3812756dd9 100644
--- a/usr.bin/tmux/cmd-show-options.c
+++ b/usr.bin/tmux/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-options.c,v 1.52 2019/05/22 18:58:31 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.53 2019/05/23 18:33:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -209,8 +209,8 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item,
if (args_has(self->args, 'v'))
cmdq_print(item, "%s", value);
else if (options_isstring(o)) {
- utf8_stravis(&escaped, value, VIS_OCTAL|VIS_TAB|VIS_NL|VIS_DQ);
- cmdq_print(item, "%s \"%s\"", name, escaped);
+ escaped = args_escape(value);
+ cmdq_print(item, "%s %s", name, escaped);
free(escaped);
} else
cmdq_print(item, "%s %s", name, value);