mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-26 04:52:53 +03:00
Use eval -no-hooks when writing the buffer in a tmp file for scripting purposes
This commit is contained in:
parent
9e12ac327b
commit
8a4cf85e22
@ -5,7 +5,7 @@ def -params ..1 spell -docstring "Check spelling of the current buffer with aspe
|
||||
try %{ addhl ranges 'spell_regions' }
|
||||
%sh{
|
||||
file=$(mktemp -d -t kak-spell.XXXXXXXX)/buffer
|
||||
printf %s\\n "write ${file}"
|
||||
printf %s\\n "eval -no-hooks write ${file}"
|
||||
printf %s\\n "set buffer spell_tmp_file ${file}"
|
||||
}
|
||||
%sh{
|
||||
|
@ -10,7 +10,7 @@ def clang-parse -params 0..1 -docstring "Parse the contents of the current buffe
|
||||
dir=$(mktemp -d -t kak-clang.XXXXXXXX)
|
||||
mkfifo ${dir}/fifo
|
||||
printf %s\\n "set buffer clang_tmp_dir ${dir}"
|
||||
printf %s\\n "write ${dir}/buf"
|
||||
printf %s\\n "eval -no-hooks write ${dir}/buf"
|
||||
}
|
||||
# end the previous %sh{} so that its output gets interpreted by kakoune
|
||||
# before launching the following as a background task.
|
||||
|
@ -8,7 +8,7 @@ def flake8-lint -params 0..1 -docstring "Lint the contents of the current buffer
|
||||
dir=$(mktemp -d -t kak-flake8.XXXXXXXX)
|
||||
mkfifo ${dir}/fifo
|
||||
echo "set buffer flake8_tmp_dir ${dir}"
|
||||
echo "write ${dir}/buf"
|
||||
echo "eval -no-hooks write ${dir}/buf"
|
||||
}
|
||||
|
||||
# end the previous %sh{} so that its output gets interpreted by kakoune
|
||||
|
@ -7,7 +7,7 @@ def jedi-complete -docstring "Complete the current selection with jedi" %{
|
||||
dir=$(mktemp -d -t kak-jedi.XXXXXXXX)
|
||||
mkfifo ${dir}/fifo
|
||||
printf %s\\n "set buffer jedi_tmp_dir ${dir}"
|
||||
printf %s\\n "write ${dir}/buf"
|
||||
printf %s\\n "eval -no-hooks write ${dir}/buf"
|
||||
}
|
||||
%sh{
|
||||
dir=${kak_opt_jedi_tmp_dir}
|
||||
|
Loading…
Reference in New Issue
Block a user