From b67c098c8c5c231fa45652d0ff96f78840172ae4 Mon Sep 17 00:00:00 2001 From: Alex Leferry 2 Date: Tue, 8 Mar 2016 20:33:54 +0100 Subject: [PATCH] code cleanup: remove optional sed option --- rc/extra/moon.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/extra/moon.kak b/rc/extra/moon.kak index fd745b4d..3d9b3e68 100644 --- a/rc/extra/moon.kak +++ b/rc/extra/moon.kak @@ -39,7 +39,7 @@ addhl -group /moon/code regex \<(and|break|catch|class|continue|do|else(if)?|exp def moon-alternative-file -docstring 'Jump to the alternate file (implementation ↔ test)' %{ %sh{ case $kak_buffile in *spec/*_spec.moon) - 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 ;; *.moon) @@ -48,7 +48,7 @@ def moon-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/.moon$/_spec.moon/) + altfile=$altdir/$(realpath $kak_buffile --relative-to $dir | sed s+[^/]'*'/++';'s/.moon$/_spec.moon/) break fi done