mirror of https://github.com/tmux/tmux.git
First period not last for host_short, from Michael Scholz.
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