screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch to change autoaka behavior


From: Erik Osheim
Subject: Re: patch to change autoaka behavior
Date: Sat, 6 Dec 2008 18:31:39 -0500

I sent this to address@hidden awhile ago (which I think I'm
subscribed to) but still haven't seen it. So, I figure I'll send it to
this list (which seems pretty active).

If there is a different development list for this sort of thing, please
point it out to me. Thanks,

-- Erik

On Fri, Dec 05, 2008 at 09:24:39AM -0500, Erik Osheim wrote:
> 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 <address@hidden(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
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]