summaryrefslogtreecommitdiff
path: root/test/shell/prompt-shell-script-completion/script
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2024-07-31 17:30:48 +0200
committerMaxime Coste <mawww@kakoune.org>2024-08-05 19:14:48 +1000
commitef18d3cbfbd8960df287423d888e2d0f10eae42d (patch)
tree28c1ac7c97421ae18fee4bec54e52f12937a4fc0 /test/shell/prompt-shell-script-completion/script
parent8a5f449c180d76566eb3eefdb3efb3c7a0116531 (diff)
rc make/grep: evaluate makecmd in calling context, use eval semantics again
I configured :make to use a special makecmd for files called test.cpp. hook global BufCreate .*/test.cpp %{ set-option buffer makecmd "g++ %val{buffile} && ./a.out" } Commit c93cb5c4d (Add a `fifo` helper command and refactor `make` and `grep` to use it, 2024-06-07) made :make evaluate makecmd in the toolsclient context instead of the calling context, so my buffer-local override no longer applies. I'm not sure if this is something we want to guarantee but it doesn't seem unreasonable, and we can fix it a no cost I think. Additionally, it changed eval "${kak_opt_makecmd}" "$@"; to $kak_opt_makecmd "$@" meaning that the "&&" in my makecmd will no longer be evaluated. Instead it will be passed as argument to g++, effectively g++ %val{buffile} '&&' ./a.out which I don't think is a reasonable expectation (unless we change makecmd to be str-list options). Essentially, the above only applies word splitting to makecmd; it seems simpler and less surprising to treat them as raw shell commands. Expand makecmd in the calling client again, and insert it verbatim into the shell script. grep hasn't needed it so far but keep it consistent.
Diffstat (limited to 'test/shell/prompt-shell-script-completion/script')
0 files changed, 0 insertions, 0 deletions