use username IP for path links
This commit is contained in:
parent
1bd77c498b
commit
34d451b8cd
1 changed files with 10 additions and 1 deletions
|
|
@ -786,8 +786,17 @@ __dotmatrix_activate_hostname() {
|
||||||
if _lp_hostname; then
|
if _lp_hostname; then
|
||||||
case "$lp_connection" in
|
case "$lp_connection" in
|
||||||
ssh)
|
ssh)
|
||||||
|
local client_ip client_port server_ip server_port hostname=
|
||||||
|
IFS=" " read -r client_ip client_port server_ip server_port <<<"$SSH_CONNECTION"
|
||||||
|
local username=${USER:-${USERNAME:-${LOGNAME-}}}
|
||||||
|
if _lp_create_link "ssh://${username}@${server_ip}:${server_port}" "$lp_hostname"; then
|
||||||
|
hostname="$link"
|
||||||
|
else
|
||||||
|
hostname="$lp_hostname"
|
||||||
|
fi
|
||||||
|
# If we want a different color for each host
|
||||||
(( LP_ENABLE_SSH_COLORS )) && LP_COLOR_SSH="$LP_COLOR_HOST_HASH"
|
(( LP_ENABLE_SSH_COLORS )) && LP_COLOR_SSH="$LP_COLOR_HOST_HASH"
|
||||||
hostname="${LP_COLOR_SSH}${lp_hostname}"
|
hostname="${LP_COLOR_SSH}${hostname}"
|
||||||
;;
|
;;
|
||||||
tel)
|
tel)
|
||||||
hostname="${lp_hostname}"
|
hostname="${lp_hostname}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue