use \005 as escape in backtick scripts

Bug #352632 reported by Dustin Kirkland 
2
Affects Status Importance Assigned to Milestone
screen (Ubuntu)
Invalid
Wishlist
Dustin Kirkland 
screen-profiles (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: screen

I would like to be able to specify a flag to 'backtick' that would interpret the results and render any markups in a hardstatus command.

This would greatly benefit the screen-profiles project, particularly for the unique logo generated per distribution.

Currently, a different static profile must be generated at package build time for each distribution.

Ideally, I'd create a "logo" script, with a case statement, switching on the distribution shown in lsb_release (or /etc/issue), and echo'ing the colored and marked-up logo accordingly.

I'll take a crack at a patch to support this...

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Just a reminder to self...

The relevant code looks to be somewhere around screen.c, MakeWinMsgEv().

:-Dustin

Changed in screen (Ubuntu):
assignee: nobody → kirkland
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Nevermind! With Michah's help, I found a brilliant way around this:

printf "\005{= wr} @ "

Woohoo.

:-dustin

Changed in screen (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

screen-profiles should *totally* use this. It would make maintenance considerably easier.

:-Dustin

Changed in screen-profiles (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

...should *totally* use this to dynamically render colored logo's for each of the supported distributions.

Currently, the build process runs profiles/generate against each logo in profiles/logos/*, sed'ing the logo in place of __LOGO__.

Rather, screen-profiles now has a bin/logo script, backtick'd into place, and dynamically renders the logo in the hardstatus line, as the distro is determined by one of a) ~/.screen-profiles/distro, b) lsb_release, c) /etc/issue.

:-Dustin

summary: - wishlist: add flag to backtick to interpret results for formatting
+ use \005 as escape in backtick scripts
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package screen-profiles - 1.42-0ubuntu1

---------------
screen-profiles (1.42-0ubuntu1) jaunty; urgency=low

  [ Dustin Kirkland ]
  * bin/cpu-freq: fix cpu freq for powerpc hardware, LP: #352286;
    use 2 decimals for GHz (bring this down to 1 decimal when cpus hit 10GHz)
  * debian/postinst, debian/prerm, screen: remove some maintainer hacks
    that should be cleaned up before Jaunty GA, LP: #352291
  * po/*: screen-profiles-export translation template
  * profiles/common: added 'altscreen on', which cleans the screen for
    programs that support this, such as vi and emacs, LP: #349677
  * bin/logo, profiles/common, profiles/generate: dynamically print logo
    LP: #352632
  * screen-profiles-export, screen-profiles-export.1: drop distro selection,
    no longer needed
  * added logo for Arch linux

  [ Adi Roiban ]
  * debian/install, debian/rules, po/POTFILES.python, po/POTFILES.sh,
    po/es.po, po/fr.po, po/screen-profiles.pot: LP: #347521, i18n support
    in the screen-profiles build and install

 -- Dustin Kirkland <email address hidden> Tue, 31 Mar 2009 17:31:10 -0500

Changed in screen-profiles:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.