From 4025ac81673e148d3e6109a6052627af9b2660a3 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 18 Sep 2020 14:50:08 +0300 Subject: [PATCH] rc modeline: Print the final command directly --- rc/detection/modeline.kak | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/rc/detection/modeline.kak b/rc/detection/modeline.kak index 39f35966..7bfd7852 100644 --- a/rc/detection/modeline.kak +++ b/rc/detection/modeline.kak @@ -102,14 +102,10 @@ define-command -hidden modeline-parse-impl %{ fi case "${type_selection}" in - vim) tr=$(translate_opt_vim "${name_option}" "${value_option}");; - kakoune) tr=$(translate_opt_kakoune "${name_option}" "${value_option}");; - *) tr="";; + vim) translate_opt_vim "${name_option}" "${value_option}";; + kakoune) translate_opt_kakoune "${name_option}" "${value_option}";; + *) exit 1;; esac - - if [ -n "${tr}" ]; then - printf %s\\n "${tr}" - fi done } }