control: tags -1 patch Hi Tom,
I hope everything is fine! I'm quoting only relevant parts below but you can see all messages at the bug URL: https://bugs.debian.org/1085228 On Sat, 19 Oct 2024 17:23:39 +0200 Ricardo Mones <mo...@debian.org> wrote: > On Fri, 18 Oct 2024 20:38:41 +0200 > David Kalnischkies <da...@kalnischkies.de> wrote: > > > I haven't looked at all at zutty, so I can't comment on if the > > Provides is correct or not – Debian policy is rather specific on > > what is needed to set that Provides, so if it doesn't this bug > > would be RC level: > > https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-a-terminal-emulator > > > > Thanks for pointing out this. For now I'm raising the severity, > because while Zutty provides a '-title' option, there's no '-T' alias > required for satisfying the third point of the policy: > > ”Support the command-line option -T title, which creates a new > terminal window with the window title title.” > > I guess it would not be difficult to patch or even convince upstream > to provide such alias for the title option. Attaching a patch (against master) implementing '-T' as an alias for '-title', therefore making Zutty policy compliant. If not accepted upstream I will add it to the Debian patches. regards, -- Ricardo Mones http://people.debian.org/~mones «Everything will be just tickety-boo today.»
From b3f51767e8435dc0a48efb5b58ba7a32b42d7963 Mon Sep 17 00:00:00 2001 From: Ricardo Mones <rica...@mones.org> Date: Sat, 19 Oct 2024 18:34:38 +0200 Subject: [PATCH] Add '-T' option as an alias for '-title' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debian policy¹ requires packages providing a terminal emulator to support the '-T' command line option to set window's terminal title. ¹ https://www.debian.org/doc/debian-policy/ch-customized-programs.html#packages-providing-a-terminal-emulator --- doc/USAGE.org | 3 +++ src/options.cc | 4 +++- src/options.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/USAGE.org b/doc/USAGE.org index 139ab2a..52f729b 100644 --- a/doc/USAGE.org +++ b/doc/USAGE.org @@ -207,6 +207,7 @@ To view the list of options, issue =zutty -h= (short for =-help=): : -quiet Silence logging output : -verbose Output info messages : -e Command line to run +: -T Window title (alias for -title) All options can be abbreviated as long as they are non-ambiguous, so it's fine to write =-di= short for =-display=, =-gl= for =-glinfo=, @@ -421,6 +422,7 @@ to see this when debugging Zutty or an application writing text at the right margin. : -title Window title (default: Zutty) +: -T Window title (alias for -title) Set the title of the Zutty window. A title configured in the X resource database will be overridden by usage of the =-e= option, @@ -428,6 +430,7 @@ which sets the title to the basename of the program to be run. Passing the title on the command line takes precedence over the title implied by =-e=. In any case, the title can be overridden at runtime by escape sequences output by the shell (or any program executed by it). +If both =-T= and =-title= are given the value of =-T= will be used. ** Shell/command specification diff --git a/src/options.cc b/src/options.cc index 6be1a74..2c216f8 100644 --- a/src/options.cc +++ b/src/options.cc @@ -316,7 +316,9 @@ namespace zutty shell = get ("shell", getenv ("SHELL")); if (!shell) shell = "bash"; - title = get ("title", nullptr, &titleSource); + title = get("T", nullptr, &titleSource); + if (!title) + title = get ("title", nullptr, &titleSource); getColor ("fg", fg); getColor ("bg", bg); rv = getBool ("rv"); diff --git a/src/options.h b/src/options.h index 59683e0..f5429d2 100644 --- a/src/options.h +++ b/src/options.h @@ -78,6 +78,7 @@ namespace zutty {"quiet", NoArg, "true", "false", "Silence logging output"}, {"verbose", NoArg, "true", "false", "Output info messages"}, {"e", SkipLn, nullptr, nullptr, "Command line to run"}, + {"T", SepArg, nullptr, nullptr, "Window title (alias for -title)"}, }; #undef NoArg #undef SepArg -- 2.39.2
pgpHvsYQRLxYh.pgp
Description: OpenPGP digital signature