From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id daf89938 for ; Wed, 16 Oct 2019 15:09:07 +0000 (UTC) Received: (qmail 2104 invoked by alias); 16 Oct 2019 15:08:58 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24351 Received: (qmail 14051 invoked by uid 1010); 16 Oct 2019 15:08:58 -0000 X-Qmail-Scanner-Diagnostics: from 195-159-176-226.customer.powertech.no by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25601. spamassassin: 3.4.2. Clear:RC:0(195.159.176.226):SA:0(3.0/5.0):. Processed in 4.116477 secs); 16 Oct 2019 15:08:58 -0000 X-Envelope-From: gcszu-zsh-users@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Klaus Ethgen Subject: Strange prompt behaviour with %? Date: Wed, 16 Oct 2019 15:31:33 +0100 Organization: The wild Jungle Message-ID: User-Agent: slrn/1.0.3 (Linux) X-No-Archive: Yes X-No-Html: Yes Cancel-Lock: sha1:K6fQybM8F/rezRtcM9h7mEbcGDU= Hi folks, I have a very strange behaviour. I have set: PS1="%{$fg_no_bold[$_usercolor]%}%m: %{$fg_bold[blue]%}?%(?.%{$fg_no_bold[green]%}.%{$fg_bold[red]%})%?%2(L. %{$fg_bold[blue]%}#%{$fg_bold[magenta]%}%L.) %{$fg_bold[blue]%}!%{$fg_bold[magenta]%}%h%1(j. %{$fg_bold[blue]%}j%{$fg_bold[magenta]%}%j.)%E %{$fg_bold[blue]%}%60<..<%~%<<\${vcs_info_msg_0_}> %{$reset_color%}" I want to have an eye on the part '%{$fg_bold[blue]%}?%(?.%{$fg_no_bold[green]%}.%{$fg_bold[red]%})%?'. When I execute "perl -e 'exit 2;'" several times, I get sometimes a 0 and sometimes a 2. (The same with "/bin/false" but there it doesn't seem to be wrong that often. Does anybody have an explanation for this behaviour? -- Klaus -- Klaus Ethgen http://www.ethgen.ch/ pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C