alexherbo2 / kakoune.cr

A command-line tool for Kakoune
https://kakoune.org
The Unlicense
54 stars 11 forks source link

Error running connect-terminal #19

Open gustavo-hms opened 3 years ago

gustavo-hms commented 3 years ago

Hi, Alex!

For me, the connect-terminal emits some errors when run:

kitty @ launch --no-response --type="window" --cwd="/home/gustavo" --match=id:3 sh -c ␊    export KAKOUNE_SESSION=$1␊    export KAKOUNE_CLIENT=$2␊    shift 3␊␊    [ $# = 0 ] && set  $SHELL"
Error: 1:1: '>' 2:3: 'connect' 2:7: 'terminal' 2:5: 'eval' no such command: '$@'

The command works as expected even with the errors.

It happens even with this minimal kakrc:

evaluate-commands %sh{
    kcr init kakoune
}

I've found it a bit weird no one else reported the same issue. Perhaps it's been caused by a very specific combination of program versions...

My setup:

alexherbo2 commented 3 years ago

I have no idea. Can you try with another terminal, such as Alacritty?

gustavo-hms commented 3 years ago

It seems to be something kitty-specific. It does work on other terminals (tested on Alacritty, Konsole and Gnome Terminal).

Looking at the error message ('eval' no such command: '$@'), my first guess is that it has something to do with how kitty is invoked from Kakoune:

        kitty @ $listen launch --no-response --type="$kak_opt_kitty_window_type" --cwd="$PWD" $match "$@"

But it's just a guess.