Skip to content

Commit 707cefd

Browse files
committed
ssh kitten: When both passthrough args and --kitten args are present dont fail just ignore the kitten args
1 parent 2787f30 commit 707cefd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kittens/ssh/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,7 @@ func main(cmd *cli.Command, o *Options, args []string) (rc int, err error) {
735735
return 1, err
736736
}
737737
if passthrough {
738-
if len(found_extra_args) > 0 {
739-
return 1, fmt.Errorf("The SSH kitten cannot work with the options: %s", strings.Join(maps.Keys(PassthroughArgs()), " "))
740-
}
741-
return 1, unix.Exec(SSHExe(), append([]string{"ssh"}, args...), os.Environ())
738+
return 1, unix.Exec(SSHExe(), utils.Concat([]string{"ssh"}, ssh_args, server_args), os.Environ())
742739
}
743740
if os.Getenv("KITTY_WINDOW_ID") == "" || os.Getenv("KITTY_PID") == "" {
744741
return 1, fmt.Errorf("The SSH kitten is meant to run inside a kitty window")

0 commit comments

Comments
 (0)