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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10371 invoked from network); 14 May 2021 23:40:56 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 May 2021 23:40:56 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1621035656; b=xmlTZK/o7y7IR7cM6USYG51U5MPLmip//58F+0kfuaBQyAT3Qp6p/DxM7q+okoy41ysQZAwDn6 K0T+CTnLB83nBQEEMZBL4b+pvl21BQ3G10qMpObprX9ITkPI3srmAbnRl9GPZ2eC45kV/tXm2S Ytjh52Xy6GNAj74bQ4bpoBGoVrwtDalreZJ0gxPcblEr/uJmS6X0nqcxbLIk7uw6CfUTQDn1X9 XpvBpe9mE4QKQScMqTc5rYJtHjk4YNpuAlxWffbI+SOcvCEsriJ+1LR+mzQfezpWbnN5t4Wzcu uopJ1l3EJzZmRyyeRh9iegBFp2lOUoUU3u10louG1dpbcQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1621035656; bh=F+kseTfcOS6MPugMo2sv1kUC0lrWRTEt2HV0s2B/lXU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=TmP54rm06JGBEFuJv/9YFnycG/wfGHPCuAnyg/5kXvIpm5d/vfaCf2fTtkqMHniqFvv5OogVnk cmBHTlhItzeFUVHAXvriIVy9CpfFQg01xxXkjLJbPYsEzaFO/Jv6b/j0j49qrBQwj8PysRUtiE P6Tjh9n8r5RMiIxgeZbJHGT14R/sFu15Wgj3VbERYh0unkUD3+I2g/jnHM9YxwU3vY8tP5LOqt 9piC3zWr0y8xVD2BNVqoTHbJOizPoGgz8VKHzUxv2chncGhKbn8TJCFjYP2k0HG/TKWxbcp0kH +EwDpkPLTu5uLy5zhMX1rzD1D6uXX9ouLtprOsx/zGvg2g==; 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-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=7/joDV78XAc+QDxGI+aX1fh2rwrVTb5BHCZ3e/bul4c=; b=pInni6xuoZqbVlepDpQ0up3e71 vaizFr83nKoa9G0Xc1KmCy2JM+rrfHLUmMo4cvgOc4yUJP2H3X58vVgZlNIhz61jxhpiNEpFGV6tE uTLKplUszCfrVtsxRQi46xF7xUPBtUWFsQ1dLRAFmvc3qUBVrrMjAn6zjWsq3bNdA2dO0BBJ7wh12 tFUNMd9cI7VXEpijasQ6JJRUpc9RJOjke6Oi4+NYtjcvop0Aco4TKkUh1S8oZZqZvRYVEvpc21anu eSSHUAl3eh7tMgbhrr2FlW9HzWWFqRvPuqFP9kqF409XXUfbPzhmJJV3W6shiT7OR/uFNNRRZznTL UjWyCk6Q==; Received: from authenticated user by zero.zsh.org with local id 1lhhQN-0006CD-5f; Fri, 14 May 2021 23:40:55 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f176.google.com ([209.85.167.176]:41746) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lhhPq-0005vD-G9; Fri, 14 May 2021 23:40:23 +0000 Received: by mail-oi1-f176.google.com with SMTP id c3so1004256oic.8 for ; Fri, 14 May 2021 16:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=7/joDV78XAc+QDxGI+aX1fh2rwrVTb5BHCZ3e/bul4c=; b=eb3ZcelQxsLRvQuJlMaE+cxmqHQeJk+KTvkzJUADTvJHOoRjorqqSb2NfCM2yKB5ey hYBtdw39Gz3N1fNNFIm4/8IzfaJqWfJhoWOYGYvbg8yoUCbcvlKb7SGCXSdFRuPJCYfC CPmq+ysrAW/NVhr9PCMeIK8C18cosMYwvroxsF9Lc+tcseOmi6XaQOA3joS3TPna8U7B B8RmvFfFtZnu2WTEuFnhsnJeAKXAgHRQEuugl5Ct/b7OO/NDUbXDQjSqW7Jbwy7ML0qT 3TRnQU7Ke7zJcjcs8bYXh2cjfM3YdhChmV1GYyERNsuREdNuBCgeyHiJDWH4lTKNECSb SrBA== 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; bh=7/joDV78XAc+QDxGI+aX1fh2rwrVTb5BHCZ3e/bul4c=; b=C3Uz74ntfmoxTGWzJZoOZZEmsEbHnz9rpPXpNxoc8CZHRfzC3ynGMEgNoIpgS6IQbK fbA0ZUWhgnDKtRMkjBLAxNPJwYIsX+GGlr3oxjIQ/0DlfdtMRQtpZAZX9HYkxw/+lHTN f+d7mnBgjmX/Xi2Y4t94FrIu8mg8en3l0sjP8fIysiMiFDRc6wWT+KVl2f0YG8c5DgRz yPsGq0y7cBSTh9aQlr1mwr8YM5YpHdqDeJ5/S1RT7fP7EhhMFIIiKEohve/iDjlb0690 cQ/aEnKPyfn+CuM8LXkV/vbJzbrMTuGEdJEmMXKtUJCH20mdHUSTrrTCjhpQdQI3Pqk+ 1gOw== X-Gm-Message-State: AOAM5318z5Hv3IMcur31gFJAc0Oi5WE6RiNqKtyz3Fvs1ppOJy9O0rSa FWu0pJ5PCGdV7j1ETO7tI1zWkvPySOoiOxl6iSS+G7bbeaeHQQ== X-Google-Smtp-Source: ABdhPJwca4vesCVWrkH+anhUIXpmtGkUIqtwSkgJanHz29+2I5xcnkQqwDU0zxa8HY/mxNMYkYVXDeG2/yVCRCWl2VI= X-Received: by 2002:a54:4f99:: with SMTP id g25mr8410866oiy.132.1621035621030; Fri, 14 May 2021 16:40:21 -0700 (PDT) MIME-Version: 1.0 References: <1185563186.165566.1619896723304.ref@mail.yahoo.com> <1185563186.165566.1619896723304@mail.yahoo.com> <1293997275.666259.1620093977494@mail.yahoo.com> In-Reply-To: From: Bart Schaefer Date: Fri, 14 May 2021 16:40:09 -0700 Message-ID: Subject: Termcap and boldface (was sticky-note) To: Zsh Hackers List Content-Type: text/plain; charset="UTF-8" X-Seq: 48826 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: On Tue, May 11, 2021 at 3:18 AM Mikael Magnusson wrote: > > On 5/9/21, Bart Schaefer wrote: > > That is, why TCALLATTRSOFF ? That isn't done for %s or %u ... why is > > there no TCBOLDFACEEND defined? > > I think that's a shortcoming in termcap and/or terminfo. In termcap > there is md (1m) and me (0m) that should correspond to bold, but 0m > turns off all attributes. Compare with us (4m) and ue (24m). A couple of interesting things. ANSI clumps together bold/faint/normal as 01/02/22 and blink/fast-blink/steady as 05/06/25. 21 and 26 are for unrelated features (double-underline and proportional). This breaks the pattern of all the other on/off pairs that are always 0x/2x. Terminfo man page claims that standout is supposed to be reverse bold, but zsh's use of termcap in prompts renders %S as reverse only. > html_chapter/termcap_4.html > also implies that there is no specific termcap sequence to only turn > off specific appearance modes. Terminfo manual says about the vt220 example, "We begin each escape sequence by turning off any existing modes, since there is no quick way to determine whether they are active." That also doesn't match what appears to happen in prompts with combinations of %S%B etc. > Since we already assume ANSI for things like colors, I don't think we > would lose a lot of compatibility in practice if we just use 22 > instead of 0 for %b That would mean special-casing whether we use symbolic termcap names, so it's less straightforward that might be expected.