From 16b861508997513d9bc0745c77d73c59a4c5333c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 16 Nov 2016 10:01:08 +0000 Subject: [PATCH] ctags.kak: Replace some subshells with parameter expansions --- rc/base/ctags.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/base/ctags.kak b/rc/base/ctags.kak index 41c18ced..4f11b2ab 100644 --- a/rc/base/ctags.kak +++ b/rc/base/ctags.kak @@ -12,7 +12,7 @@ def -params ..1 \ [ -f "$candidate" ] && readlink -f "$candidate" done | awk \'!x[$0]++\' | # remove duplicates while read -r tags; do - namecache=$(dirname "$tags")/.kak.$(basename "$tags").namecache + namecache="${tags%/*}/.kak.${tags##*/}.namecache" if [ -z "$(find "$namecache" -prune -newer "$tags")" ]; then cut -f 1 "$tags" | uniq > "$namecache" fi @@ -28,7 +28,7 @@ If no symbol is passed then the current selection is used as symbol name} \ [ -f "$candidate" ] && readlink -f "$candidate" done | awk '!x[$0]++' | # remove duplicates while read -r tags; do - printf '!TAGROOT\t%s\n' "$(readlink -f $(dirname "$tags"))/" + printf '!TAGROOT\t%s\n' "$(readlink -f "${tags%/*}")/" readtags -t "$tags" $tagname done | awk -F '\t|\n' ' /^!TAGROOT\t/ { tagroot=$2 }