]> arthur.barton.de Git - ax-zsh.git/blob - default_plugins/ssh/ssh.zshrc
less: Set up color usage
[ax-zsh.git] / default_plugins / ssh / ssh.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # ssh.zshrc: Setup (Open-) SSH
3
4 # Make sure that "ssh(1)" is installed
5 (( $+commands[ssh] )) || return
6
7 ssh_logname_prompt() {
8         [[ -n "$SSH_CLIENT" ]] || return 1
9         echo "$LOGNAME"
10         return 0
11 }
12
13 ax_logname_prompt_functions=($ax_logname_prompt_functions ssh_logname_prompt)
14
15 ssh_hostname_prompt() {
16         [[ -n "$SSH_CLIENT" ]] || return 1
17         echo "$SHORT_HOST"
18         return 0
19 }
20
21 ax_hostname_prompt_functions=($ax_hostname_prompt_functions ssh_hostname_prompt)