From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13830 invoked by alias); 24 Jan 2010 10:51:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27635 Received: (qmail 7312 invoked from network); 24 Jan 2010 10:51:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at mycircuit.org does not designate permitted sender hosts) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=FLNw7BHwbCoA:10 a=xNx9s4ikNNyBxTUwpIRkeQ==:17 a=CtVjk-SHgWTkLnoMkEwA:9 a=rqjX1Yd9xORfsCfCsQ-hGF0sjdIA:4 Received-SPF: none receiver=mailfe10.swip.net; client-ip=188.155.188.182; envelope-from=vmail@mycircuit.org Message-ID: <4B5C180D.8080904@mycircuit.org> Date: Sun, 24 Jan 2010 10:51:09 +0100 From: Peter User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: Re: what is the effect of a percentage sign (%) as last character on the command line References: <4B582F3C.2010709@mycircuit.org> <100121080540.ZM21444@torch.brasslantern.com> <4B58AB3A.7050300@mycircuit.org> <2d3b879b1001211336m5b78982au96f267ea472af43d@mail.gmail.com> <4B58D35D.1050208@mycircuit.org> <100121182713.ZM21821@torch.brasslantern.com> <4B597061.10701@mycircuit.org> <100123155239.ZM27228@torch.brasslantern.com> In-Reply-To: <100123155239.ZM27228@torch.brasslantern.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > I presume you had that somewhere interesting like inside your precmd > or preexec function? Just having it "in .zshrc" wouldn't affect any > command except possibly the very first one. > Yes, sorry , my snippet was too short: git_info() { ref=$(git symbolic-ref -q HEAD 2>/dev/null) ref=${ref#refs/heads} echo ${ref:+"${GREEN}[$ref]${WHITE}"} EXITCODE='%(?..(%?%))' precmd () { PS1="%m%F{red}${EXITCODE}%f%# " RPROMPT="$(git_info)%30<..<%/" case $TERM in (xterm*|rxvt|mrxvt) print -Pn "\e]0;%n@%m: $1\a" ;; esac } And to follow your script hint ( with the erronous precmd version above ) : $ date% $(127) $ script zsh.out Script started, file is zsh.out $ date% zsh: command not found: date% $ Script done, file is zsh.out $ cat zsh.out Script started on Sun 24 Jan 2010 10:42:39 AM CET $ date% zsh: command not found: date% $(127) Script done on Sun 24 Jan 2010 10:43:06 AM CET $ date% $(127) So apparently , the script program swallows the "dangling" control character and the shell behaves as expected ... Peter