nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] set the terminal emulator's titlebar


From: Mike Frysinger
Subject: Re: [Nano-devel] set the terminal emulator's titlebar
Date: Sat, 27 Jan 2018 01:41:52 -0500

On 19 Oct 2017 03:22, Brand Huntsman wrote:
> The attached patch sets the terminal emulator's titlebar to "nano: $prefix 
> $path" or "nano: $path".

seems like it should be behind a knob

would be nice if the string was customizable with like % replacements,
but i don't think anything in nano supports that currently.

> +    if (prefixlen > 0)
> +     printf("%s ", prefix);
> +    printf("%s\007", path);

curses will take care of escaping sequences so it doesn't mess things up.
this code doesn't.  for example:
  $ s=$(printf '\e]0;asdf\a')
  $ touch "$f"
  $ nano "$s"
then check out the title.  i'm sure you could throw in other things for fun.
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

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