# shellcheck shell=dash
# SSH[SSH_CONNECTION]

# If using ssh to a remote tmux, there might be a problem ...

___x_cmd_theme_comp_ssh(){
    [ -n "$SSH_CONNECTION" ] || return 1

    x_ssh_client_ip="${SSH_CONNECTION%% *}"
    x_ssh_client_port="${SSH_CONNECTION#"$x_ssh_client_ip" }"
    x_ssh_client_port=${x_ssh_client_port%% *}

    x_ssh_server_port="${SSH_CONNECTION##* }"
    x_ssh_server_ip="${SSH_CONNECTION% *}"
    x_ssh_server_ip="${x_ssh_server_ip##* }"
}

alias theme:comp:ssh=___x_cmd_theme_comp_ssh
