For the last several years I've been using a patched version of screen. Currently, the default screen's autoaka feature renames a window to the first word whenever a command is run. For instance, "vim FOO" renames the window to "vim".
My coworkers and I don't find this particularly useful, since often one is running the same command in different windows with different arguments. My patch makes the entire command the title. I would be open to a config toggle, if some people prefer the old behavior (so far I haven't met anyone of this persuasion). Also, I could imagine a "max length" setting, although I haven't needed one. I don't actually know how to write code to use the config file, but if someone gave me a small sample I could definitely add that to the patch if necessary. Anyway, here's the patch. Does it seem like something that could make it into git? -- Erik
>From b93bc8b112937584a7ccd3619a7cf4f65d942524 Mon Sep 17 00:00:00 2001 From: moculus <[EMAIL PROTECTED](none)> Date: Fri, 5 Dec 2008 09:06:29 -0500 Subject: [PATCH] make autoaka use the whole command --- src/ansi.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ansi.c b/src/ansi.c index d6952ea..83ce793 100644 --- a/src/ansi.c +++ b/src/ansi.c @@ -2266,13 +2266,14 @@ FindAKA() else wp->w_autoaka = 0; line = cp; - while (len && *cp != ' ') - { - if (*cp++ == '/') - line = cp; - len--; - } - ChangeAKA(wp, (char *)line, cp - line); + y = (int)cp; + while (len) + { + if (*cp++ != ' ') + y = (int)cp; + len--; + } + ChangeAKA(wp, (char *)line, (int)y - (int)line); } else wp->w_autoaka = 0; -- 1.6.0.4