BTS

Issue979

Title zshrc info_print appends annoying whitespace
Priority feature Status resolved
Superseder Nosy List btittelbach, ft
Assigned To ft Topics zsh

Created on 2011-04-19.20:41:40 by btittelbach, last changed 2011-05-11.19:16:34 by ch.

Messages
msg3784 (view) Author: ch Date: 2011-05-11.19:16:33
We believe that your issue has been closed by the upload of
Version 0.3.89 of grml-etc-core from Christian Hofstaedtler <ch@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 11 May 2011 21:06:10 +0200
Source: grml-etc-core
Binary: grml-etc-core
Architecture: source all
Version: 0.3.89
Distribution: unstable
Urgency: low
Maintainer: Michael Prokop <mika@grml.org>
Changed-By: Christian Hofstaedtler <ch@grml.org>
Description: 
 grml-etc-core - core ecetera files for the grml system
Changes: 
 grml-etc-core (0.3.89) unstable; urgency=low
 .
   [ Frank Terbeck ]
   * [a3a39fe] zshrc: Removing d()
   * [e193e4a] zshrc: activate zsh lookup for all users
   * [dc4eb5b] Fixing ssl-cert-{sha512,sha256,sha1,md5}()
   * [42b4b5f] Add *.substvars to gitignore
   * [690a5be] Waste less space in window titles [Closes: issue979]
   * [204f0ba] Preserve cursor position with `sudo-command-line' [Closes: issue980]
 .
   [ Michael Prokop ]
   * [d3a3ea5] /etc/skel/.zshrc: provide improved rationalise-dot version by Mikael Magnusson
 .
   [ Ulrich Dangel ]
   * [72b956d] Depend on grml-scripts-core instead of grml-scripts.
   * [6ab1014] Revert "Depend on grml-scripts-core instead of grml-scripts."
   * [8670ff0] Recommend grml-scripts-core
 .
   [ Christian Hofstaedtler ]
   * [ed29215] Bump Standards-Version to 3.9.2 (no changes)
Checksums-Sha1: 
 c14ef64f47b2f192bc6345f196a0da07a11b2f16 1528 grml-etc-core_0.3.89.dsc
 34b1ef6eedee8d85d8d0190760a2779467ed983e 156641 grml-etc-core_0.3.89.tar.gz
 36ab21ad969533f7369631db975d3ff615c10341 156688 grml-etc-core_0.3.89_all.deb
Checksums-Sha256: 
 b6da2e887ade8447ae44c904f1784582ba1c33874d53bc394187dc2d24b1fbd0 1528 grml-etc-core_0.3.89.dsc
 2a3ef0897dd0c7a91d54e2f6b2e9b916346caaf9da399e984fcf460b6832a942 156641 grml-etc-core_0.3.89.tar.gz
 66aa5386c5fa5d2f045688ba8a004f7efe012367bae163e2d006919f2f12c271 156688 grml-etc-core_0.3.89_all.deb
Files: 
 665b35bb3fc82eb26760eece805fdfb1 1528 grml optional grml-etc-core_0.3.89.dsc
 72de9d22d2c4031d3a4c476a555f2d63 156641 grml optional grml-etc-core_0.3.89.tar.gz
 cc4115acb20d4f6aa0d934889fb9acc0 156688 grml optional grml-etc-core_0.3.89_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJNyt78AAoJEL7IfitBhWKafuUQALARLEcg3AJMmPGU/JVJiH8x
uLZnqEDGrSX6o+Yagg2r8PM+5SwnkPShg1rqvRf6tTq1Btc+qIuiysAl7ed+FRwR
uabJW7DYwNvWwCWfUHDvd1G1Z1EHMu/NF4SptRbtkTJMDFIEygCtYcYYZnC7P2V9
kKo1FzP/5Io/Onc47oWfncjlqUdamUQrlE1XBrWsgkeVQ3hGeFbs5fbTtoHJm8MK
kr81yc1tVpAwUtE1HR3oXwmuOGD/KcU7I7HaAIsvFpl2SVVKYmEd4LwolNzleaZO
007+7cp16Uk/s/88Xs//dEvBVXxYD1rgbAmsRup0lyFGP1nGutJfoZIrZlhsbCAA
8rhEfK7CpHHRPYnuvHEDJ4/B2EyUCNiahJvI/FaYbHCWdEir0KTOJvLbv7HW5PZy
55VsgaiaNa6Ys6d/W6rg7lKZ/oQOuJODHC2BJ2ItB3OI7PNnfjI04OFjHIx/kNwZ
b6Iet2pFQYu0D0sktX2TA8E1Sljtv/8Lva8pWtWXZgqA7UP3b3SfOuE+w3tImsVE
2eFrYtXJME2r9NYIUpnznmmKj14md8ZSzZTzpstPuZUcvPk5AeGRLShCjfMcD/ok
CMWCY5g08CqPtHx+cst1DGgzDlN+1W/l3/5xPBNMduQClaDWFmASlJj7/ZrZWAyu
Xl6rnYEbkBfts39sBuL9
=nLwr
-----END PGP SIGNATURE-----
msg3742 (view) Author: btittelbach Date: 2011-04-19.22:14:57
no problem, i know where to find the commit :)
many thnx
msg3740 (view) Author: ft Date: 2011-04-19.21:23:32
And now the web interface fucked up. Oh well.
msg3739 (view) Author: ft Date: 2011-04-19.21:23:10
Bah. Mixed up the URIs.

<http://git.grml.org/?p=grml-etc-
core.git;a=commitdiff;h=690a5be664cdfbd914582e4c59672426356250ea>
msg3738 (view) Author: ft Date: 2011-04-19.21:21:31
Bernhard Tittelbach wrote:
> good point! "$*" it is then.

<http://git.grml.org/?p=grml-etc-core.git;a=commitdiff;h=204f0badc2dcc238a7816a97d6ca2c3b0e84c4b5>
msg3736 (view) Author: btittelbach Date: 2011-04-19.21:13:26
good point! "$*" it is then.
msg3734 (view) Author: ft Date: 2011-04-19.21:05:23
Agreed.

We probably want the "$*" way, because we'd still be wasting room if "$@" contained
empty arguments (yes, a corner case - but still).

(Assinged-To: and Nosy List: adjusted)
msg3731 (view) Author: btittelbach Date: 2011-04-19.20:41:39
.zshrc's info_print concatenates strings and always appends a space at each
string. Consequently, there is one space too many at the end of the resulting
window or screen title.

In screen this additional space per windows eats up a lot of space on the
hardstatus line, when lot's of windows are in use.

the for loop in info_print should propably be replaced by a
printf '%s' "${(j: :)@}"
or a
printf '%s' "$*"
if that doesn't break anything else..

e.g.:
function info_print () {
     local esc_begin esc_end
     esc_begin="$1"
     esc_end="$2"
     shift 2
     printf '%s' ${esc_begin}
-    for item in "$@" ; do
-        printf '%s ' "$item"
-    done
+    printf '%s' "${(j: :)@}"
     printf '%s' "${esc_end}"
History
Date User Action Args
2011-05-11 19:16:34chsetmessages: + msg3784
2011-04-19 22:14:57btittelbachsetstatus: fixed-in-git -> resolved
messages: + msg3742
2011-04-19 21:23:32ftsetmessages: + msg3740
2011-04-19 21:23:10ftsetmessages: + msg3739
2011-04-19 21:21:32ftsetmessages: + msg3738
2011-04-19 21:18:19ftsetstatus: in-progress -> fixed-in-git
2011-04-19 21:13:26btittelbachsetmessages: + msg3736
2011-04-19 21:05:23ftsetstatus: unread -> in-progress
nosy: + ft, - uli1
messages: + msg3734
assignedto: uli1 -> ft
2011-04-19 20:41:40btittelbachcreate