Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
truncating string in .zprofile
- X-seq: zsh-users 17715
- From: Eric Smith <Eric.Smith@xxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: truncating string in .zprofile
- Date: Wed, 20 Mar 2013 19:28:27 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author