Update of /cvsroot/tmux/tmux
In directory vz-cvs-2.sog:/tmp/cvs-serv22217

Modified Files:
        status.c tmux.1 
Log Message:
Sync OpenBSD patchset 898:

Provide #h for short hostname (no domain) from Michal Mazurek.


Index: status.c
===================================================================
RCS file: /cvsroot/tmux/tmux/status.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- status.c    18 Apr 2011 21:07:58 -0000      1.158
+++ status.c    25 Apr 2011 20:35:22 -0000      1.159
@@ -410,6 +410,13 @@
                        fatal("gethostname failed");
                ptr = tmp;
                goto do_replace;
+       case 'h':
+               if (gethostname(tmp, sizeof tmp) != 0)
+                       fatal("gethostname failed");
+               if ((ptr = strchr(tmp, '.')) != NULL)
+                       *ptr = '\0';
+               ptr = tmp;
+               goto do_replace;
        case 'I':
                xsnprintf(tmp, sizeof tmp, "%d", wl->idx);
                ptr = tmp;

Index: tmux.1
===================================================================
RCS file: /cvsroot/tmux/tmux/tmux.1,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -d -r1.309 -r1.310
--- tmux.1      25 Apr 2011 20:33:42 -0000      1.309
+++ tmux.1      25 Apr 2011 20:35:22 -0000      1.310
@@ -14,7 +14,7 @@
 .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: April 19 2011 $
+.Dd $Mdocdate: April 24 2011 $
 .Dt TMUX 1
 .Os
 .Sh NAME
@@ -2009,6 +2009,7 @@
 .It Li "#(shell-command)" Ta "First line of the command's output"
 .It Li "#[attributes]" Ta "Colour or attribute change"
 .It Li "#H" Ta "Hostname of local host"
+.It Li "#h" Ta "Hostname of local host without the domain name"
 .It Li "#F" Ta "Current window flag"
 .It Li "#I" Ta "Current window index"
 .It Li "#P" Ta "Current pane index"


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to