zsh-users
 help / color / mirror / code / Atom feed
* Truncate without padding
@ 2005-10-31 11:27 DervishD
  2005-10-31 15:35 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: DervishD @ 2005-10-31 11:27 UTC (permalink / raw)
  To: Zsh Users

    Hi all :)

    I would like to print a string truncated *but* without padding,
so I cannot use the "l" and "r" parameter expansion flags. Of course,
I could use the "%" parameter expansion flag and use %>STRING>, but I
don't want the string to be prompt-expanded.

    I know I can use "printf" or "zformat" for that, but I was
wondering if this can be done using "print" and some form of
expansion. I need to use "print" because sometimes I have to do
translation of echo escape sequences and sometimes not, and I've
implemented that using optionally the "-r" option to "print". I can
switch to printf and do any translation before, but I would like to
use the current code and not switch to printf or zformat.

    Thanks a lot in advance :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-31 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-31 11:27 Truncate without padding DervishD
2005-10-31 15:35 ` Bart Schaefer
2005-10-31 17:21   ` DervishD
2005-10-31 23:56   ` DervishD

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).