Joerg Jaspert <jo...@debian.org> writes:

> Though yes, with that reading this bug could be changed to a
> "automatic-rename only covers some tmux internal foo, please provide
> another such option to entirely turn off any automatic renaming of
> windows" wishlist bug and kicked upwards to upstream. Where automatic is
> "anything that the user doesnt do manually right in tmux. Like
> "command-key whatever" sequence...

Okay, so you want something like the following. I'll see what upstream
thinks about this.

diff --git a/input.c b/input.c
index 17307e9..bb23580 100644
--- a/input.c
+++ b/input.c
@@ -1558,6 +1558,8 @@ input_exit_rename(struct input_ctx *ictx)
 {
        if (ictx->flags & INPUT_DISCARD)
                return;
+       if (!options_get_number(&ictx->wp->window->options, "allow-rename"))
+               return;
        log_debug("%s: \"%s\"", __func__, ictx->input_buf);
 
        xfree(ictx->wp->window->name);
diff --git a/options-table.c b/options-table.c
index 2700536..8318780 100644
--- a/options-table.c
+++ b/options-table.c
@@ -435,6 +435,11 @@ const struct options_table_entry window_options_table[] = {
          .default_num = 0
        },
 
+       { .name = "allow-rename",
+         .type = OPTIONS_TABLE_FLAG,
+         .default_num = 1
+       },
+
        { .name = "alternate-screen",
          .type = OPTIONS_TABLE_FLAG,
          .default_num = 1
diff --git a/tmux.1 b/tmux.1
index 0b8f077..6ce2edf 100644
--- a/tmux.1
+++ b/tmux.1
@@ -2346,6 +2346,12 @@ this option is good for full-screen programs which 
support
 .Dv SIGWINCH
 and poor for interactive programs such as shells.
 .Pp
+.It Xo Ic allow-rename
+.Op Ic on | off
+.Xc
+Allow programs to change the window name using a terminal escape
+sequence (\\033k...\\033\\\\). The default is on.
+.Pp
 .It Xo Ic alternate-screen
 .Op Ic on | off
 .Xc



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to