Skip to content

SSH kitten and command with glob #1787

@lithammer

Description

@lithammer

As suggested by the FAQ, you can use the kitten to automatically copy the terminfo to the remote user like so:

kitty +kitten ssh myserver

Now, I'm running Fish shell and figured I would create a wrapper function for this (maybe this was a bad idea to begin with?):

# ~/.config/fish/functions/ssh.fish
function ssh -d 'kitty compatible ssh command'
    switch $TERM
    case xterm-kitty
        kitty +kitten ssh $argv
    case "*"
        command ssh $argv
    end
end

My problem is that this breaks Fish's tab completion for remote files for the scp command. And it basically boils down to this part:

kitty +kitten ssh -o 'BatchMode yes' example.com /bin/ls -dp \*
/bin/ls: cannot access '*': No such file or directory

Same command using ssh directly:

command ssh -o 'BatchMode yes' example.com /bin/ls -dp \*
404.jpg
src/
temp/

It seems like the kitten is treating * literally, instead of a glob on the remote.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions