Could not edit file in Kakoune by specifying client and server
VKondakoff opened this issue · comments
Hi!
Here is excerpt from Kakoune docs:
if you need an actual explorer to interact with the editor, you can create a Kakoune script that will
spawn the tool in question, which should in return send an "edit" command followed by the path
of the file you selected to the current Kakoune session
(e.g. echo "eval -client $kak_client edit /path/to/file" | kak -p $kak_session)
I'm trying to set Broot like this. Here is my verb:
{
invocation: edit
shortcut: e
key: enter
apply_to: text_file
execution: "echo eval -client client0 edit {file} | kak -p vk"
leave_broot: false
}
Unfortunately when I press Enter
on a text-file just nothing happens (command is echoed, though):
If I run the same command manually form command line - everything works as expected, the file is successfully opened in specified Kakoune session:
What may be wrong here? Am I missing something?
Thank you!
Please, give me some ideas, what may be wrong!
Everything works as expected if I'm running this from command line (zsh, macOS):
echo eval -client vk edit ~/.config/broot/verbs.hjson | kak -p vk
But nothing happens if I'm adding the same line to verbs.hjson
:
{
invocation: edit
shortcut: e
key: enter
apply_to: text_file
execution: "echo eval -client vk edit ~/.config/broot/verbs.hjson | kak -p vk"
leave_broot: true
}
Here is what I see in broot.log
:
18:39:46.560 [DEBUG] broot::app::app: cmd_result: Launch
18:39:46.560 [DEBUG] broot::task_sync: dead dam
18:39:46.562 [DEBUG] broot: launching Program {
exe: "echo",
args: [
"eval",
"-client",
"vk",
"edit",
"/Users/valerykondakoff/.config/broot/conf.hjson",
"|",
"kak",
"-p",
"dmn2",
],
working_dir: None,
switch_terminal: true,
capture_mouse: true,
keyboard_enhanced: false,
}
18:39:46.562 [DEBUG] broot::launchable: working_dir: None
18:39:46.562 [DEBUG] broot::launchable: switch_terminal: true
18:39:46.567 [INFO] broot: bye
What does this means? Is this quoting issue?
I'm still experimenting with this.
Let's take this simple command: echo test | grep test
. If I run it from command line I'm receiving the following:
But if I put the same command to verbs.hjson
and press enter on any file in Broot I'm receiving the following:
{
invocation: edit
shortcut: e
key: enter
apply_to: text_file
execution: "echo test | grep test"
leave_broot: true
}
Is there a way I can pipe the echo
output to grep
? (MacOS, zsh)
Thank you!