zsh-users
 help / color / mirror / code / Atom feed
* truncating string in .zprofile
@ 2013-03-20 18:28 Eric Smith
  2013-03-20 19:41 ` Paul Hoffman
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Smith @ 2013-03-20 18:28 UTC (permalink / raw)
  To: Zsh Users

I have the following prexec() in my profile;
preexec () { print -Pn "\033k\033\134\033k[$1]\033\134" }

This prints the command in the screen caption for that window.

What I want to do is limit this window title to n chars.

However, I cannot manipulate the `$1' in the print string.
Even if I try.
substring=$1
preexec () { print -Pn "\033k\033\134\033k[$substring]\033\134" }

then there is no value printed for $substring.

What is the solution?

Thank 
Eric Smith


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

end of thread, other threads:[~2013-03-21 13:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 18:28 truncating string in .zprofile Eric Smith
2013-03-20 19:41 ` Paul Hoffman
2013-03-20 20:17   ` Eric Smith
2013-03-20 20:45     ` Paul Hoffman
2013-03-20 20:54       ` Eric Smith
2013-03-21 12:34         ` Paul Hoffman

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