From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11215 invoked by alias); 8 Jul 2016 17:47:32 -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: 38811 Received: (qmail 11653 invoked from network); 8 Jul 2016 17:47:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=AbU4KWVApW0cKCS1HMMLnUBL3ut905zpVZKL64bqOm0=; b=SThNm6/sCvyyFY3rFdpebrHtMF7LHzccoRlY1fexM9WjIG6GBZ6jBIvIdzEtvvuI/S AI5gKlHq7rY3vSxDhA+2zbWCCOed6lp+YcL6FUcCvItJ/ZpAM7BP76dhw84+Pqb5q9GH 3JgSRVX2nTXBjb0M1cw3YLopC+s9cXye5TCvkrVNL7xrB0a6XpVEAAJTc3vVS4VV7XtK q2/UbWXnSywbJxuFErUOCtcpN6AsKp7UB5sJr+a8uyDdSkQXTN9bzrH3gds0UEkhNoJi bp5eap+OOn9usyGZRdPsP8DiaVFAdtVds7qJ6tkPvLd2y7N3ZhDL1bFoMu2Cvq8RyMzV rvxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=AbU4KWVApW0cKCS1HMMLnUBL3ut905zpVZKL64bqOm0=; b=g0NqEYI9hJ87U82XIxKPv8Cf1pFmgm6CQRyDh8EC26eIDnrPHIYvUE92nxZ2TjCqT1 0ib5Oxs9yr8wOhFf1YJYa+MEJYBgMK8SSGaMGAZF/FWWSrbVWa9+Umao8qIMV1bTzOqG vPvXUS9T5UjRZMsvG17a5izITBdsDpFt1fLsEjTP5yauBJGj4R0HuHyPG+XqlaX4iFFu d6qLdl/f8NJhWBCRdcr0xocauqHz2ZZe0Qg3wyN7HZCXqJIfkXFRYiNvM2X36uTWs7z6 3Fb4DpVrZ8BkA72uAFxikpBZVFU9GtiNlGV+W3Gbkc1Lmb9AACmVNuP2m8s/OooCl0Sg sXuQ== X-Gm-Message-State: ALyK8tKzxNt86ap+F8Vx6rr1xbLXEPGzN0efBb/qhlVh2l+1LFNqF49G+8F6qpKl8dOXhg== X-Received: by 10.66.0.74 with SMTP id 10mr11948916pac.38.1468000046058; Fri, 08 Jul 2016 10:47:26 -0700 (PDT) From: Bart Schaefer Message-Id: <160708104729.ZM27890@torch.brasslantern.com> Date: Fri, 8 Jul 2016 10:47:29 -0700 In-Reply-To: <55898.1467933681@hydra.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: tab completion color inversion" (Jul 8, 1:21am) References: <49130.1467902941@hydra.kiddle.eu> <160707100125.ZM23567@torch.brasslantern.com> <55898.1467933681@hydra.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: tab completion color inversion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 8, 1:21am, Oliver Kiddle wrote: } } You can get the same, completion altering attributes } effect, with PROMPT='%S%U%Bhello%b ' Presumably it's intentional that reaching the end of the prompt string does not implicitly reset all the %S %U etc. attributes? E.g., meant to be combined with ( preexec() { print -nP %u%s } ) or similar. Using that prompt I can still get effects where the %S%U ends in the middle of a command line after completing. I don't think this is a bug, per se, because leaving the attributes hanging open like that is not exactly documented behavior, but it might argue that they should be implicitly turned off. (I think completion always resets the attributes, but sometimes ZLE reprints the whole prompt which turns them back on again.) } txtchangep and txtattrmask seem to be doing much the same thing - } tracking the current attributes. The need for tracking attributes that } have been turned off such as TXTNOBOLDFACE seems a bit odd - wouldn't } the absence of TXTBOLDFACE do the job? You've stated most of my confusion over this, quite succinctly. My only guess is that one represents a temporary state change from the more persistent state of the other, but I haven't worked out how that plays or which is which. } I've not done that then but I did put the AND before the OR. In thinking about this further, swapping the AND and OR subexpressions does change the semantics when the same bit is present in both X and Y. Maybe that never comes up.