Hi
Please try this (against CVS HEAD):
Index: cmd-display-message.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/cmd-display-message.c,v
retrieving revision 1.4
diff -u -p -r1.4 cmd-display-message.c
--- cmd-display-message.c 13 Nov 2009 19:53:29 -0000 1.4
+++ cmd-display-message.c 19 Nov 2009 08:44:33 -0000
@@ -30,8 +30,8 @@ int cmd_display_message_exec(struct cmd
const struct cmd_entry cmd_display_message_entry = {
"display-message", "display",
- CMD_TARGET_CLIENT_USAGE " [message]",
- CMD_ARG01, "",
+ "[-s] " CMD_TARGET_CLIENT_USAGE " [message]",
+ CMD_ARG01, "s",
cmd_target_init,
cmd_target_parse,
cmd_display_message_exec,
@@ -56,7 +56,10 @@ cmd_display_message_exec(struct cmd *sel
template = data->arg;
msg = status_replace(c, template, time(NULL));
- status_message_set(c, "%s", msg);
+ if (cmd_check_flag(data->chflags, 's'))
+ ctx->print(ctx, "%s", msg);
+ else
+ status_message_set(c, "%s", msg);
xfree(msg);
return (0);
Index: tmux.1
===================================================================
RCS file: /cvs/src/usr.bin/tmux/tmux.1,v
retrieving revision 1.121
diff -u -p -r1.121 tmux.1
--- tmux.1 18 Nov 2009 17:02:17 -0000 1.121
+++ tmux.1 19 Nov 2009 08:46:29 -0000
@@ -1988,14 +1988,19 @@ Ask for confirmation before executing
This command works only from inside
.Nm .
.It Xo Ic display-message
+.Op Fl s
.Op Fl t Ar target-client
.Op Ar message
.Xc
.D1 (alias: Ic display )
Display a message (see the
.Ic status-left
-option below)
-in the status line.
+option below).
+If
+.Fl s
+is given, the output is printed, otherwise it is displayed in
+.Ar target-client .
+status line.
.It Ic select-prompt Op Fl t Ar target-client
Open a prompt inside
.Ar target-client
On Thu, Nov 19, 2009 at 03:17:33AM +0100, Zrajm C Akfohg wrote:
> Is there a way to get the current session name (in a script) in tmux?
>
> In screen I simply look at $STY (unless it has changed -- messy business
> that).
>
> I've tried searching through the manpage, but only found how to
> display session name in the status line.
>
> I had expected something like "tmux get-option session-name" or
> somesuch. But maybe I'm just reading the manpage wrong?
>
> /zrajm
>
> P.S. I'm just *loving* the "update-environment" option. I have an
> attach-wrapper-script for screen which does that (by storing selected
> variables to a file and having all shells source that file when it's
> updated), but built-in support is much appreciated!
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> tmux-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tmux-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users