From mboxrd@z Thu Jan 1 00:00:00 1970 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=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 28471 invoked from network); 6 Apr 2020 23:53:37 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 6 Apr 2020 23:53:37 -0000 Received: (qmail 24898 invoked by alias); 6 Apr 2020 23:53:24 -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: 24765 Received: (qmail 17747 invoked by uid 1010); 6 Apr 2020 23:53:24 -0000 X-Qmail-Scanner-Diagnostics: from mail-il1-f180.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25772. spamassassin: 3.4.4. Clear:RC:0(209.85.166.180):SA:0(-2.0/5.0):. Processed in 2.283433 secs); 06 Apr 2020 23:53:24 -0000 X-Envelope-From: astrothayne@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.180 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OVnFCOolzFzYwFEGBFCtzIJXWySHrhW5r0iJISogu1M=; b=tCKJKsd8kaOY3VBcc0fn3YySDpY865j/1O7dsYMxEX6+p8KrT9u+OvnWBxiXYZOFlF k4CsrBRGYO8At/Gs65+opDfpuD1DgFgFtNsCDDDVS+C2DixXHThMbtpR5+ZPSDJto2Xp PApt9ZAIRhB0vHpLYro+z/l7MmEujv/bcZYrwK5XKV3bp4JnKNAHrvzUe/yzoN5gCjpe O92+qSEnR8gA02ncoB1PXld3nDewYnr9NfKm7E/C4XNoFNYcXrmHipl93WTzZK2x4Nj5 HDc0yezEli+EMQdCio8QzvoyvvNt6/weU0hIjbhtekiNNaIu2U3etj+Yb9wOBbHEwkWQ aMEQ== X-Gm-Message-State: AGi0PuZTmM9R701aaN6NSmcHPnsD8xw25Mt0/l6bnnGtR4aqLcJ7MMzi ULMZOSK38TIFStvYlQ+v62bxPae1XUjmsKhje1mqhMMmir4= X-Google-Smtp-Source: APiQypLe6cs/ZF4rmNOq8jNtPW899aXZUmYKtYqyMPdrSZFZcToGTqBcRHyT6xjUJ1ORBP11Ixk+kIHtJ0UbqFo0ZZI= X-Received: by 2002:a92:ba46:: with SMTP id o67mr1269ili.66.1586217169749; Mon, 06 Apr 2020 16:52:49 -0700 (PDT) MIME-Version: 1.0 From: Thayne Date: Mon, 6 Apr 2020 17:52:38 -0600 Message-ID: Subject: Using 8bit colors in prompt expansion on a terminal with 24bit color support To: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" I recently tried out powerlevel10k, but ran into something weird. The classic theme had blue backgrounds, where it was supposed to have gray backgrounds. After some investigation I discovered it was because the `%K` expansion just passes the value through to the setab terminfo format, which in the case of "direct" terminfo entries (alacritty-direct in my case, but I think it would be the same with xterm-direct) assumes it is an RGB value if it is greater than 8. Apparently this is intentional behaviour (https://lists.gnu.org/archive/html/bug-ncurses/2019-03/msg00009.html) for terminfo. Is it expected that zsh's prompt expansion for colors behaves this way?If so, maybe the documentation on it should be more clear that it is the users responsibility to make sure that you use 24bit colors (with hex) rather than 8bit colors if the terminal expects it (by checking for the RGB property in terminfo). Or should zsh map the 8bit color to the corresponding 24bit color?