Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: My zshrc; any sugestions welcome
- X-seq: zsh-users 4785
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Marijan Peh <marijan.peh@xxxxxxxxxxx>, zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Re: My zshrc; any sugestions welcome
- Date: Tue, 26 Mar 2002 17:10:31 +0000
- In-reply-to: <20020326174631.A831@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020325175935.A1729@xxxxxxxxxxxxx> <Pine.LNX.4.44.0203251101280.5070-100000@xxxxxxxxxxxxxxxx> <20020326103835.A175@xxxxxxxxxxxxx> <1020326151112.ZM32099@xxxxxxxxxxxxxxxxxxxxxxx> <20020326174631.A831@xxxxxxxxxxxxx>
On Mar 26, 5:46pm, Marijan Peh wrote:
} Subject: Re: My zshrc; any sugestions welcome
}
} > } > > This display just first letter of current running job. ex:
} > } > > I run 'top' but is shows only 't' in titlebar.
} >
} > Hmm, it works for me. Show us your whole command line, again?
}
} preexec () {print -Pn "\033]0;%n@%m ${${(@)${(z)1}:#*[[:punct:]]*}[1]} %~\007"}
Oh, silly me. Single-element arrays are treated as scalars, so if the
command consists of only one word, you get only the first letter, but
if it consists of multiple words you get the first word. I never tried
it with a command with no arguments.
So try this:
preexec () {
print -Pn "\033]0;%n@%m ${${(@)${(z)1}:#*[[:punct:]]*}%% *} %~\007"
}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author