Replace remaining $kak_bufname with more correct $kak_buffile
This commit is contained in:
parent
02760394ba
commit
92c425ad52
|
@ -15,7 +15,7 @@ def clang-complete %{
|
||||||
# displayed.
|
# displayed.
|
||||||
(
|
(
|
||||||
pos=-:${kak_cursor_line}:${kak_cursor_column}
|
pos=-:${kak_cursor_line}:${kak_cursor_column}
|
||||||
cd $(dirname ${kak_bufname})
|
cd $(dirname ${kak_buffile})
|
||||||
output=$(clang++ -x c++ -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-at=${pos} - < ${kak_opt_clang_filename} |& tee /tmp/kak-clang-out |
|
output=$(clang++ -x c++ -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-at=${pos} - < ${kak_opt_clang_filename} |& tee /tmp/kak-clang-out |
|
||||||
grep -E "^COMPLETION:[^:]+:" | perl -pe 's/^COMPLETION:[^:]+: +//; s/:/\\:/g; s/\[#.*?#\]|<#.*?#>(, *|\))?|\{#.*?#\}\)?//g')
|
grep -E "^COMPLETION:[^:]+:" | perl -pe 's/^COMPLETION:[^:]+: +//; s/:/\\:/g; s/\[#.*?#\]|<#.*?#>(, *|\))?|\{#.*?#\}\)?//g')
|
||||||
rm -r $(dirname ${kak_opt_clang_filename})
|
rm -r $(dirname ${kak_opt_clang_filename})
|
||||||
|
|
|
@ -77,8 +77,8 @@ decl str-list alt_dirs ".;.."
|
||||||
def alt %{ %sh{
|
def alt %{ %sh{
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
alt_dirs=${kak_opt_alt_dirs//;/ }
|
alt_dirs=${kak_opt_alt_dirs//;/ }
|
||||||
file=$(basename ${kak_bufname})
|
file=$(basename ${kak_buffile})
|
||||||
dir=$(dirname ${kak_bufname})
|
dir=$(dirname ${kak_buffile})
|
||||||
|
|
||||||
case ${file} in
|
case ${file} in
|
||||||
*.c|*.cc|*.cpp|*.cxx|*.C)
|
*.c|*.cc|*.cpp|*.cxx|*.C)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user