From 789af3f4ffa7eee271a417211beae0c87c745148 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 15 Oct 2018 12:01:42 +0300 Subject: [PATCH] use awk instead of uniq, since awk doesn't nead sorted output to remove duplicates --- rc/fzf.kak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index e0843af..5980120 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -74,7 +74,7 @@ Supported tools: universal-ctags: ""readtags"" Default arguments: - ""readtags -l | cut -f1 "" + ""readtags -l | cut -f1 | awk '!a[\$0]++'"" " \ str fzf_tag_command "readtags" @@ -1612,9 +1612,9 @@ define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{ if [ ! -z "$1" ]; then mode=$(echo "$additional_message" | grep ":" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") - cmd="readtags -Q '(eq? \$kind $1)' -l | cut -f1 | uniq" + cmd="readtags -Q '(eq? \$kind $1)' -l | cut -f1 | awk '!a[\$0]++'" else - cmd="readtags -l | cut -f1 | uniq" + cmd="readtags -l | cut -f1 | awk '!a[\$0]++'" fi [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings="