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

Re: quick question about '%s' expansion



On Sun, Sep 09, 2001 at 01:54:01AM +0400, Borsenkow Andrej wrote:
> Simon Hausmann wrote:
> > 	date +%s
> > 
> > results in the following output
> > 
> > 	" date "+" date "+"999985277
> > 
> 
> {pts/2}% date +%s
> 999985938
> {pts/2}% echo $ZSH_VERSION
> 4.0.2
> 
> Check with zsh -f. Is it possible that date is aliased/defined as function?

Ah, yes, with -f it works. Silly me, I had a preexec which looked like

	preexec () {print -Pn "\e]0;%n@%m: $*\a"}

and apparently the %s got caught by the prompt expansion, causing output
beyond the xterm escape sequence. I splitted it up in two print's 
(one with -P and one without) and now it works :)


Simon



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