zsh-users
 help / color / mirror / code / Atom feed
From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@sunsite.dk
Subject: Re: Justifying text output
Date: Fri, 12 Mar 2004 23:33:40 +0100	[thread overview]
Message-ID: <3qfvelk17wkg.dlg@thorstenkampe.de> (raw)
In-Reply-To: <30391.1079090901@trentino.logica.co.uk>

* Oliver Kiddle (2004-03-12 12:28 +0100)
> Thorsten Kampe wrote:
>> I wrote a little script[1] that compiles the main zsh config files. Is
>> there any way to make the "[ ok ]"/"[ failed ]" messages on the right
>> justified?
> 
> I'll add a third way, also compatible with ksh: using printf.
> 
> printf "${ltred}* ${white}%-60s [ ${ltred}failed${white} ]\n" "ERROR:    $file - file not readable"
> 
> They key bit is the '%-60s' in the format string which tells it to
> print the string right justified with a width of 60 spaces.

Thanks. The key bit is to understand it, but I haven't found any
documentation about that (just a small one in the susv3. Are there any
explanations available (along with this "${(r:70:):-" and
"${(r.40.):-" stuff)?

Thorsten


  reply	other threads:[~2004-03-12 22:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-12  2:01 Thorsten Kampe
2004-03-12 10:55 ` Bart Schaefer
2004-03-12 23:24   ` Thorsten Kampe
2004-03-13  6:24     ` Bart Schaefer
2004-03-13 17:48       ` Thorsten Kampe
2004-03-13 18:58         ` Oliver Kiddle
2004-03-12 10:59 ` Peter Stephenson
2004-03-12 22:33   ` Thorsten Kampe
2004-03-13  3:29   ` Thorsten Kampe
2004-03-12 11:28 ` Oliver Kiddle
2004-03-12 22:33   ` Thorsten Kampe [this message]
2004-03-12 23:03     ` Pavol Juhas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3qfvelk17wkg.dlg@thorstenkampe.de \
    --to=thorsten@thorstenkampe.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).