% git describe
1.8-116-g75ec17f

In tmux-1.9/format.c seems to be a mistake finding host_short, strrchr 
should be replaced by strchr for searching for a dot in hostname.  E.g. my 
hostname is "pumpkin.fth-devel.net".  With #h in status-right I get 
"pumpkin.fth-devel" but I expect "pumpkin".

--- format.c.orig       2013-09-02 15:42:42.000000000 +0200
+++ format.c    2013-09-02 15:42:42.000000000 +0200
@@ -121,7 +121,7 @@

        if (gethostname(host, sizeof host) == 0) {
                format_add(ft, "host", "%s", host);
-               if ((ptr = strrchr(host, '.')) != NULL)
+               if ((ptr = strchr(host, '.')) != NULL)
                        *ptr = '\0';
                format_add(ft, "host_short", "%s", host);
        }

% uname -a
FreeBSD pumpkin.fth-devel.net 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 
r255072: Fri Aug 30 15:27:31 CEST 2013 
r...@pumpkin.fth-devel.net:/usr/obj/usr/src/sys/PUMPKIN amd64

Mike

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to