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

Re: My zshrc; any sugestions welcome



Hi Marijan,

> > preexec () {
> >   print -Pn "\033]0;%n@%m ${${(@)${(z)1}:#*[[:punct:]]*}%% *} %~\007"
> > }
> 
> I just now noticed that it's not working for 'two_or_more' word job ex.
> If i run 'vi .Xresources .vimrc .slrnrc' it only shows 'vi' in titlebar.
Right, that's bothering me right now, too.

> With '$1' it works perfectly? (shows complete line).
> Why is $1 bad?
First I didn't understand it either, then I stumbled over more complicated
command lines with quotes and stuff in it.  For example, try:

 echo hi | perl -ne 'print "oops\n"'

This should just print:
 oops
but with <$1> in preexec it prints:
 
 "'>" pts/17 ~oops

I'd really get it to work the way you tried, but I can't figure it out. :-(
Any suggestions anyone?

Thanks,
 Andy.

-- 
           http://peru.spiegl.de  Our project
      http://radiomaranon.org.pe  Radio Marañón, Jaén, Perú
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Do files get embarrassed when they get unzipped?



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