Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: My zshrc; any sugestions welcome



On Tue, Mar 26, 2002 at 05:10:31PM +0000, Bart Schaefer wrote:
[cut]
> 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"
> }

Yep, that's the right thing. Thnx

Kind regards
Marijan Peh

-- 
 .~.   marijan.peh@xxxxxxxxxxx
 /V\   /bin/zsh 4.1.0-dev-4 (i686-pc-linux-gnu)
/( )\  Linux nymos.home.hr 2.4.18-rmap-rml #3
^^ ^^



Messages sorted by: Reverse Date, Date, Thread, Author