1
0
Fork 0

use awk instead of uniq, since awk doesn't nead sorted output to remove duplicates

This commit is contained in:
Andrey Orst 2018-10-15 12:01:42 +03:00
parent 3120c4f1c1
commit 789af3f4ff

View file

@ -74,7 +74,7 @@ Supported tools:
universal-ctags: ""readtags"" universal-ctags: ""readtags""
Default arguments: Default arguments:
""readtags -l | cut -f1 "" ""readtags -l | cut -f1 | awk '!a[\$0]++'""
" \ " \
str fzf_tag_command "readtags" str fzf_tag_command "readtags"
@ -1612,9 +1612,9 @@ define-command -hidden fzf-tag -params ..1 %{ evaluate-commands %sh{
if [ ! -z "$1" ]; then if [ ! -z "$1" ]; then
mode=$(echo "$additional_message" | grep "<a-$1>:" | awk '{$1=""; print}' | sed "s/\(.*\)/:\1/") mode=$(echo "$additional_message" | grep "<a-$1>:" | 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 else
cmd="readtags -l | cut -f1 | uniq" cmd="readtags -l | cut -f1 | awk '!a[\$0]++'"
fi fi
[ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings=" [ ! -z "${kak_client_env_TMUX}" ] && tmux_keybindings="