diff options
| author | fsub <31548809+fsub@users.noreply.github.com> | 2019-02-04 20:14:19 +0100 |
|---|---|---|
| committer | fsub <31548809+fsub@users.noreply.github.com> | 2019-02-04 20:14:19 +0100 |
| commit | 3f29d5ebbf81f20ba60fe66f7ff64128e05e3f06 (patch) | |
| tree | e0fc3e73f3d1cc148bcead677b37176d7b1155e5 | |
| parent | 5c0175d90a583578f4e1575c3154aa39686c1545 (diff) | |
ctags: eliminate redundant variable
| -rw-r--r-- | rc/base/ctags.kak | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/base/ctags.kak b/rc/base/ctags.kak index aaa3d514..20eabac0 100644 --- a/rc/base/ctags.kak +++ b/rc/base/ctags.kak @@ -8,7 +8,7 @@ declare-option -docstring "list of paths to tag files to parse when looking up a define-command -params ..1 \ -shell-script-candidates %{ - realpath() { ( path=$(readlink "$1"); cd "$(dirname "$1")"; printf "%s/%s\n" "$(pwd -P)" "$(basename "$1")" ) } + realpath() { ( cd "$(dirname "$1")"; printf "%s/%s\n" "$(pwd -P)" "$(basename "$1")" ) } eval "set -- $kak_opt_ctagsfiles" for candidate in "$@"; do [ -f "$candidate" ] && realpath "$candidate" @@ -24,7 +24,7 @@ define-command -params ..1 \ If no symbol is passed then the current selection is used as symbol name} \ ctags-search \ %{ evaluate-commands %sh{ - realpath() { ( path=$(readlink "$1"); cd "$(dirname "$1")"; printf "%s/%s\n" "$(pwd -P)" "$(basename "$1")" ) } + realpath() { ( cd "$(dirname "$1")"; printf "%s/%s\n" "$(pwd -P)" "$(basename "$1")" ) } export tagname=${1:-${kak_selection}} eval "set -- $kak_opt_ctagsfiles" for candidate in "$@"; do |
