mirror of
https://github.com/tmate-io/tmate.git
synced 2025-04-23 19:09:13 +02:00
First period not last for host_short, from Michael Scholz.
This commit is contained in:
parent
21bca549d3
commit
884a21d0f5
2
format.c
2
format.c
@ -121,7 +121,7 @@ format_create(void)
|
|||||||
|
|
||||||
if (gethostname(host, sizeof host) == 0) {
|
if (gethostname(host, sizeof host) == 0) {
|
||||||
format_add(ft, "host", "%s", host);
|
format_add(ft, "host", "%s", host);
|
||||||
if ((ptr = strrchr(host, '.')) != NULL)
|
if ((ptr = strchr(host, '.')) != NULL)
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
format_add(ft, "host_short", "%s", host);
|
format_add(ft, "host_short", "%s", host);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user