Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
question about quoting % in preexec
- X-seq: zsh-users 7937
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: question about quoting % in preexec
- Date: Fri, 27 Aug 2004 17:20:08 +0200
- Kinfo: virscan ok
- Kinfo: NoRelay, NoSpam
- Kreccount: 1
- Mail-followup-to: ZSH User List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
I am using the following preexec-function to display the currently running
process in my xterm-title:
preexec () {
print -Pn "\033]0;%n@%m <${(Vq)2}> %~\007"
print -Pn $icontitle
}
But if I run a command with "%" in the arguments, e.g.:
date "+%Y-%m-%d %H:%M:%S"
it leads to very unwanted results because zsh interprets it as variables.
How can I avoid this? I suppose I have to quote the %s but how?
Thanks so much for your help,
Andy.
--
o _ _ _
------- __o __o /\_ _ \\o (_)\__/o (_) -o)
----- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/ /\\
---- (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_ _\_v
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Money often costs to much. -- Ralph Waldo Emerson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author