From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 04AF5216BC for ; Thu, 25 Jan 2024 10:12:58 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1706173978; b=Nj8nOZTI2MMcbUoDSYyM0onAkBRc00onJVdvT6r9jcvGsCIuGY6J6kiDdIUv8LS+ynPUFk8GEr pWJO8VOLuHWXODzr3qnrXBqWgqQQnl9YqXLWLKkIy0Lfh8ZkdpHR2vaXCZxdbxK7GV5KaNQCwW bFUi8Phs+JPI9UTFaJVECQapSH8enSaJj5HaacuoOFtSlL2EHSlZGWKVqnvj+O94H5Ak1pXygF 4dspn66oxuU2W419evYwzMdDmyAjfb+6P9omevmu1T1j7CDvczlsOW9QsegqDO77UME+9o5MmE vRpjJ4V9azFnctxYIF8losiUFKDRVPpy3I/4yPsQlrDWtw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f41.google.com) smtp.remote-ip=209.85.167.41; dkim=pass header.d=gmail.com header.s=20230601 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-20210803; t=1706173978; bh=WzcAA79Mvwwe+Mp8VHZNcx+59wPQozdR1Iol9frPTdE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:In-Reply-To:Cc:References:Message-ID:Date:Subject: MIME-Version:From:Content-Transfer-Encoding:Content-Type:DKIM-Signature: DKIM-Signature; b=ACvmhSJoPIxnppMSg3rXFcg15/WRq2nTUryFlUsfEXgci57FLqgw6IyiRmL3CXkB36i3t/kgfT VoGFqN/q7HhFJenAF0n9rMPlzzGpKktiOdo0yvJzHUzjZwfgoj0a7JL0mn2t88GdSOdxnemv+x SkQtrA3Bygds/qkdQl4eyU6P29uJzfnkKlOB8JvL9n+NHmtv+erFyZbHrX8KyYPrcEx8b4Y+kV /5zakreLAa7fSMo0KE8Kgmt4/ZpF1nn9nOF4rAfX265H6L0GrgqSdUUu01ynWPS64f9n2pPc5+ e1J5O22tilCkwlxacOK5E+S47b/mWXl2R+ynCqKInz0lNQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:To:In-Reply-To:Cc:References: Message-Id:Date:Subject:Mime-Version:From:Content-Transfer-Encoding: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=WzcAA79Mvwwe+Mp8VHZNcx+59wPQozdR1Iol9frPTdE=; b=bXMHywwHXnChsX9TQf1B027eCe IE2ckv24Kn29TQ1RyKtJxkFYqjXv5oqqKEb7caGAoLDsa8YxVaCEAU8an5eAy9dlopheT3m0LIGNY X/8v68dMTnjYEWyRuYQDZV1CjScRYu/nkUkUaqNoJC9AJeU+TH8VBm1qxTFl4rg4/3XZd0UcarJye nrKosF/pTFPxed0PRTJwIRBOOQFJ91hzLY93YoEzJLgeJsnkuVHBFRmaxLlRfo3dlKngvNQnnnGXb aqWjHIHLFqmgOWTHdCz5hJPMM5y4Pg4KROWPYlnYga1bKuhyq1HDhEmvb2P3Vhx9f7TATdWTLD3Ja 9CLWuqpA==; Received: by zero.zsh.org with local id 1rSvn8-000C9k-9k; Thu, 25 Jan 2024 09:12:58 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f41.google.com) smtp.remote-ip=209.85.167.41; dkim=pass header.d=gmail.com header.s=20230601 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f41.google.com ([209.85.167.41]:38176) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rSvmv-000BqG-AT; Thu, 25 Jan 2024 09:12:46 +0000 Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-50e79299da9so1382547e87.1; Thu, 25 Jan 2024 01:12:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706173964; x=1706778764; darn=zsh.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=WzcAA79Mvwwe+Mp8VHZNcx+59wPQozdR1Iol9frPTdE=; b=Cew+pAIEfMLzC3BkuwLXsZvQQdoiHbs3tJxAgojiwkvuE6pXq9aTbfxxJskpE6FZK9 Wb6ymLsV9EifDr+f5N7toBGbh2CcdjJ4BjXtC70pRPxAROOSbnCIvkLB3J0Cqbs6zpKd raO5wki8bPce5cHsPoOUgAs7PDC6nfakPX4mXymV33+syl8alpbnCFQ4eVDj8d72JjIe zIl00wSsbYJ/LH5XTR34+B+kZN6Z1uGEkvlVZdCnCgqhMe7piLVXH+4rcLAl2X4xmDXy 1+DM9Y3qvL2BisCjnaSjccMmTJMncQVviukC9kQ6HQAa5rqLptVBavCC2x1Ak6DJwoCo SouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706173964; x=1706778764; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WzcAA79Mvwwe+Mp8VHZNcx+59wPQozdR1Iol9frPTdE=; b=pxDe+icxOZk/q7a2wWoBufv3qUDRKKkTDqxLJShSklZHKLDHjIu5bDYUtqvNlD1kAI 6MLY+t9Kh+pN8VYDM52mzAyo4JplLL2qc9X7LJs0m51xgszxGl0qCdFEc/L8ZtlnGCT+ MyH+CTRIrNXNAhLUvL1D0kKr4Tfoja5LBHUA9lZo0+uGngv8eZp/LPvJg3LfQzGZsREU ILxI/neH4krmPUERSRuRcYxX6FcugCI4wJuAOHkGv7BQjxBfpY7GFPwR6ATPPN0svhqM t1foFcgY1YXbe8q6q7gxVXOuVcDqVneaRmaVrZb5heYve7SUlA7zAN46C+0eYSdceBcS 2nsQ== X-Gm-Message-State: AOJu0YwiJ5CiL93fO9SjdghWj8ISKS/EXKzr31NcZJRM0HwDKAJHCw+L f3b4Pe2DS9QzoN5AAAC5oMmaV3SLegLKj+fpKbO/vpen+lkKZRAY5HefbtvcGDU= X-Google-Smtp-Source: AGHT+IHji/JlpO5TNEyI65CZRnrc48yH6WbgZpg8VUKP5BZ6U0e6lz9KyoTB1XkijYfo79tOK6d5Mw== X-Received: by 2002:a05:6512:612:b0:510:b0d:7194 with SMTP id b18-20020a056512061200b005100b0d7194mr744149lfe.0.1706173964066; Thu, 25 Jan 2024 01:12:44 -0800 (PST) Received: from smtpclient.apple (37-33-4-253.bb.dnainternet.fi. [37.33.4.253]) by smtp.gmail.com with ESMTPSA id s25-20020a197719000000b0050e6b04a5b2sm2906425lfc.251.2024.01.25.01.12.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 01:12:43 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Marlon Richert Mime-Version: 1.0 (1.0) Subject: Re: PATCH: highlight groups (was Re: Why are prompt expansions of %v sequences quoted in bindkey style?) Date: Thu, 25 Jan 2024 11:12:32 +0200 Message-Id: <018EC426-E674-4EFF-9F5F-375CD67E6AA7@gmail.com> References: <16378-1706136069.980168@UYJb.QT-b._wqn> Cc: Zsh workers In-Reply-To: <16378-1706136069.980168@UYJb.QT-b._wqn> To: Oliver Kiddle X-Mailer: iPhone Mail (21C66) X-Seq: 52501 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 25. Jan 2024, at 0.41, Oliver Kiddle wrote: >=20 > The following is something which I've been intending to add since the > attribute code refactoring from a year ago which added support for > italic and faint without adding new prompt escapes. The hardest part > of adding those now would be finding unused available letters and a > separate abstraction layer for visual attributes is rather more useful. Regarding the problem of finding unused letters: Perhaps you could create an= EXTENDED_PROMPT option that enables using multi-letter escape sequences? It= would make prompt escapes much more readable if one could use an actual wor= d or at least more than one letter for each. For example, it would be more r= eadable to able to write =E2=80=9CBackground=E2=80=9D or =E2=80=9CBg=E2=80=9D= instead of =E2=80=9CK=E2=80=9D. Having an associative version of $psvar would also help a lot, especially if= %v sequences would expand first and then all other sequences afterwards. It= would essentially let you create your own escape sequences. Here=E2=80=99s a= trivial example of what I mean: psvar=3D( dir '%F%~%f' ) PS1=3D'%v{dir}%# ' That would make it so much easier to both read and modify prompt strings.