Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
did the way arrays get indexed change between 4.2 and 4.3?
- X-seq: zsh-users 11665
- From: William Scott <wgscott@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: did the way arrays get indexed change between 4.2 and 4.3?
- Date: Tue, 24 Jul 2007 16:14:45 -0700
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: wgscott@xxxxxxxxxxxxxxxxxx
I am using zsh-4.3.4
I am using the following function to put the current working
directory and penultimate directory in a tab on iTerm (also works
with Konsole):
settab () {
tab_label="$PWD:h:t/$PWD:t"
rlength="20"
echo -ne "\e]1;$tab_label[-$rlength,-1]\a"
}
The idea is that if the string is longer than 20 characters, it
truncates it from the right, instead of the left (default behavior).
On 4.3.4 this works great. On 4.2.3, if the original string has
fewer than 20 characters, the tab is blank.
Is there a decent work-around, as I hate to conditionally test for
the zsh version every time the tab dynamically updates.
William G. Scott
contact info: http://chemistry.ucsc.edu/~wgscott
Messages sorted by:
Reverse Date,
Date,
Thread,
Author