From a92c51d84fdb3c0f75f3f57d83a970317b8ef816 Mon Sep 17 00:00:00 2001 From: Alex Leferry 2 Date: Tue, 8 Mar 2016 20:33:21 +0100 Subject: [PATCH] code cleanup: remove optional sed option --- rc/base/lua.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/base/lua.kak b/rc/base/lua.kak index ef8cfbdf..52ec0024 100644 --- a/rc/base/lua.kak +++ b/rc/base/lua.kak @@ -35,7 +35,7 @@ addhl -group /lua/code regex \<(and|break|do|else|elseif|end|false|for|function| def lua-alternative-file -docstring 'Jump to the alternate file (implementation ↔ test)' %{ %sh{ case $kak_buffile in *spec/*_spec.lua) - altfile=$(eval echo $(echo $kak_buffile | sed -e s+spec/+'*'/+';'s/_spec//)) + altfile=$(eval echo $(echo $kak_buffile | sed s+spec/+'*'/+';'s/_spec//)) [ ! -f $altfile ] && echo "echo -color Error 'implementation file not found'" && exit ;; *.lua) @@ -44,7 +44,7 @@ def lua-alternative-file -docstring 'Jump to the alternate file (implementation for dir in $dirs; do altdir=$dir/spec if [ -d $altdir ]; then - altfile=$altdir/$(realpath $kak_buffile --relative-to $dir | sed -e s+[^/]'*'/++';'s/.lua$/_spec.lua/) + altfile=$altdir/$(realpath $kak_buffile --relative-to $dir | sed s+[^/]'*'/++';'s/.lua$/_spec.lua/) break fi done