From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1085 invoked from network); 15 Oct 2020 17:09:46 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Oct 2020 17:09:46 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1602781786; b=R6ZUjWIvTpKHB513AE6X8FBLukrB360o36zr0Yb9MxULIOwp7mAkh6r6WU6hZjYAXapJLzIab4 vqQ37xbhrZ+ei5Q36naZlievxuNOhwRe+SGijjnvN3hHdO2+pgabfSOkqo8tyWPquKU7aBzBou PDAZ9juGrF+OBZzafavBmtC/pASs9T9UEGQMz7QcL79KHRUIXAYuJnuAnci+GuJS63TjtLwnpu 8KflWePMi6sopxgDAz917msnjGG+/x+JDTKGxXHGMXOyzv3wQ0yq3TEU4M+l58SyBNXhgZ8/pH b++hbHAOAuI4pYcqBN2TyRslOJbX/2gMNozO070whRwzNw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f175.google.com) smtp.remote-ip=209.85.166.175; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1602781786; bh=YruuUqR7BWGDJwwPYXt42RpKFDMax1TK86GoPJ12PWg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=fmwTR6rc9Raw4pqm2TodEf6J65qBfksKEGlsYjgDL9Gt+mN2P0atSxHvVxnl4vj1Ut9FKEgy8o /O8dLHMfpEnv2G285yBj2a5k7Z4NXfevxNgLT4NDyvJyG2HfK4lqK8W2EUvXWEe+N6EYAN1xTY ijC3U+75V5I+ZzQ3aS9gJCmp7k9D+jYkkBNyM1X66NHRfdlVtLdW84kiYVQICouGnFCmuJP1fe 7IC7cJ2EpemGzUYtor+ZYwPk+T6K7AmZcPoPX4iPkb3c+jzPn0Wh0TMzLomunn4DRcJjHkcvfj +lD+LKq2K83rPc/tDadZiEtYzxKlfOqylOV3lF/FcWXBeA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YruuUqR7BWGDJwwPYXt42RpKFDMax1TK86GoPJ12PWg=; b=QBvbzjHFzyrC2kI0wStW+Yz9YO QwQAFv9h1+YgqigiAWH1+jOGjw9tFHfa6Kcr2dHfd7JPYA86OTWg20MRztNOZlwaEz15lw8a+kZ0o tTzKV0PnrogHTXaRS9G1hZwu+JNXFuiT75/yPLJfPDrT56s5rRVLhuy47LJk5anW6aSxfmWaMVoRW AqgRmMeTgPArRPVQv4+OI68b8Vp1WGWmTJ0RhIJGwGxLChqqXDMPf2CdJqXXH714nQstDYXEcMKXG f7l5t1eOCcb8BZq+Qv55Y75wodX2o6YFUSoubxbs6olWioW7G7LrpWXSMEtexmP14wb4zDkfGnOyd zMNt6VRw==; Received: from authenticated user by zero.zsh.org with local id 1kT6l5-000HXM-KM; Thu, 15 Oct 2020 17:09:43 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f175.google.com) smtp.remote-ip=209.85.166.175; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f175.google.com ([209.85.166.175]:45836) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kT6km-000HNc-F4; Thu, 15 Oct 2020 17:09:25 +0000 Received: by mail-il1-f175.google.com with SMTP id t18so5060965ilo.12 for ; Thu, 15 Oct 2020 10:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YruuUqR7BWGDJwwPYXt42RpKFDMax1TK86GoPJ12PWg=; b=hX24YtacqRvCd2UZTcSsvoNFiThZv6Z4uzBkLisY4HA5f3Uw9kst3h5f+oIK0SJ1Og uLGdMzEQuC9QhOK/DNok9pvKpV8iaoqJSw4kiZI+73o53fw/aUxmYu5fYyodhBjoLAgc 7O0q6VMtzVyXAuGW0PpypSGdfKTuZvqx4GmNJGaleU8vWgYKsfianAg5iSiSLbVqFb2m eIoV9TWf+n24JU7Kn7CqmDhIbPhBm/x8lVpZagm2OrxfQDSUrkVmlpUmJcvQ0LU7J8bh iCpA+ZPGYMnI3+MH/d+8fs+xSuFNoGRVgQzbb5JO0hOd4BqTLNwKpsURdnJ9xkJ4aHZv ekkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YruuUqR7BWGDJwwPYXt42RpKFDMax1TK86GoPJ12PWg=; b=lMOcKWkNBONZrPBJ5XXrUg5wWvZk7h+tqJN50D9/ixz2e+6ZCjykt2a0UDv3uY2iIn VGRP4XTiUKCZx/L5vUBD0XSWYvSH+QPJLTupCr6Tnh8hGgfWfCDhMyYQDAEnBzIm4vU7 chFI/lj1zvDLX4pd8Z7gw26W2Y74TOhpB3ZJ/eLfFPc1KhKbBJTArGYY5QlbCuGNr8Rg 8DStYmjXKmbkjkvgRYktLrNOP73AIOy2pNzeCm7GOFGBq03L9UA+2UlS6hzbE1Lcf/0R AEC/Tp7uni389FJPV+WQbN/x1KjOGe9OVrTt4mg7XUThERaOGU37wGLuKqFlQ88MYKLm 7YGQ== X-Gm-Message-State: AOAM530nPwEMoj6iqB6AVGUsV2NoIZ6a1E+b1OqADtRF+EIHpwtlnwxz pjEB2zwHCwYSBtlVg/LYZoulRqkhbu/YfvaLGZA= X-Google-Smtp-Source: ABdhPJz2mf5gT88jmIGbox0iFQehQ8gA1oMotg5d88X8MX+WlDEmfLBOHEqw+uLtzyk6L+OcBJVpSqU3NV54r5POh4A= X-Received: by 2002:a92:bb0d:: with SMTP id w13mr4182252ili.168.1602781763013; Thu, 15 Oct 2020 10:09:23 -0700 (PDT) MIME-Version: 1.0 References: <0B36073E-6BF5-4C42-B591-1573FEC2AFA8@gmail.com> In-Reply-To: <0B36073E-6BF5-4C42-B591-1573FEC2AFA8@gmail.com> From: Roman Perepelitsa Date: Thu, 15 Oct 2020 19:09:10 +0200 Message-ID: Subject: Re: region_highlight converts `fg=default` to `none`, which is not the same To: Marlon Richert Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 47464 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Thu, Oct 15, 2020 at 6:58 PM Marlon Richert w= rote: > > > > On 15. Oct 2020, at 10.37, Roman Perepelitsa wrote: > > > > Going forward, we can extend the spec syntax to give users more > > flexibility. I can see two extensions. > > > > 1. In addition to "underline", one can use "underline=3Don" and "underl= ine=3Doff". > > 2. If the first character of the spec is "+", it's merged with the > > current spec for the region; if the character is "=3D", it overrides; > > otherwise the current behavior is preserved (specs with fg and bg > > override, other specs merge). > > > > Thoughts? > > If you=E2=80=99re going to extend the spec syntax, could you consider add= ing more ANSI attributes, such as `faint` and `conceal`? It's premature to say I'm going to extend the spec syntax. Just thinking out loud, looking for feedback. That said, extra ANSI attributes would be useful. My first choice would be italic. The biggest problem with adding it is that zattr doesn't have free bits left, so adding just one extra one/off attribute would require changing the type of zattr from uint64_t to some kind of struct, which would in turn require sweeping code changed because zattr is used in so many places as an argument to bitwise operators. I've spent a full day on this a few months back and eventually stashed the change. Another obstacle to supporting more ANSI attributes is the shortage of upper- and lowercase letters that can be used in prompt expansions (similar to %B/%b and %U/%u for bold and underlined). It would be a shame if it was possible to use italic/faint/conceal in region_highlight but not in prompt. Note that the spec extension I proposed (or rather mused about) above isn't affected by these challenges. Roman.