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, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14676 invoked from network); 11 Aug 2022 16:26:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Aug 2022 16:26:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1660235175; b=MWZ8iGv4adE+s+n+AbMjg7vNbqE5o/vD1CRZACvxcdZvk2RWn5dxTLlYm1SBsOm5l7r1UBHdBS OfIXrJT2gBWgfVzcENHpEEj0XI60Bk8N3OTJGluR0hCJHZtkrnote8vENrRh+L6x8lX/QVGyIh RJJMN1UKdGhdKbSHQAFpcfkAAueff7bSQIT63biX/1aSCd+SWfPKANWJvq+mDLc/YNRUHxrjwq B/nrSH/AcQHPxG6ajZarR0Phcn+nbusLs9JFV4Wo7su9XvFZ4xzsQtTZfEsmuZ+d87JHYiViUV CV3DIS8XX0BoEqN0Oc2+DUBCIQhkNHfJPXdgOHBY6C+kMg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f42.google.com) smtp.remote-ip=209.85.208.42; dkim=pass header.d=gmail.com header.s=20210112 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=1660235175; bh=gJTD/arF+MkhI8kzefwoLDYfNaS1l3vC0NnBN7ckRnI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=O+gfgIqEYDYBbPx9KaRDWCoROXLwL1u9kzgK/KEdBwPUbOUNs5GVhx1qJP3dZdoQJ/7mE/E2Em pxv7Vqa3XGCSTlJN8gyz8z8zadOR3OBwtNaFwEwYZDKI94xeCfjFnIhPCUr5atpFH0g//IIfFA Ame5ZmUQBOAV2GKkWbBNgG5f5tsTePO1lT6lLzITyqIkB8jdofv7iFepp85534jivGvtni/Okn t67QLE05KoI0m9ypCJbSRGoiBaTszrliNgszigGg8A2WY3yCuHEHb2z/Tim7Z0HWSIXCZnj8Ra 0rGbynDGoOm8b1bbq2UCLGfqWfy29iftlCLdkMmtn418TQ==; 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:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hS8+pHM6zG2r/404Uyn19CNzUJXfPFsX32UdQvovRRI=; b=h93wEhVC97s9E+0trlovAwsZAX mgvqveTOQqi6iw/ED1K9EkrgQw+QlJYANkalmQ9lYXbg5UcVutQn+5f270mFjocUHUVL5Esy4sPJN 8EULIdIRljSSn7b1BXOlY61xJitrcfOpTSprhOpW/mZnUcLhgcgK/V3tWN6HPczs51MGkJDBgmRTv x3lIVR9b26c7W7nEotvbidQwrxX8O3zGmXyv3w3DhwqRpIuMJ5x7FwkPrY2w/1qIzkl54wE3EGVcN AtKKGgLGHaZNslYIc6Z2AraKpYLpoiqsT5rEOx+xCpwB1NSOkNkU7yoFqHW9I9BK4KLnpjTbZ5bi3 kfxC08aQ==; Received: from authenticated user by zero.zsh.org with local id 1oMB0h-000CHM-6P; Thu, 11 Aug 2022 16:26:15 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f42.google.com) smtp.remote-ip=209.85.208.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ed1-f42.google.com ([209.85.208.42]:41861) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oMAvW-000Bpy-Dm; Thu, 11 Aug 2022 16:20:54 +0000 Received: by mail-ed1-f42.google.com with SMTP id r4so23569690edi.8; Thu, 11 Aug 2022 09:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=hS8+pHM6zG2r/404Uyn19CNzUJXfPFsX32UdQvovRRI=; b=hBm2HnVkoCLkSwBGnLA8au+vnZqIhpWGomZ3j/LwC0RV3bu88t07xQLacvu13o+aZY x6X3FqXrwNUW8ChqXlEvqmvKBl2Uc/ULqvFL5FRsRWADf8hPl50HeLOpQ59rulqW9JK+ dU3MzpmqU1IpSBNkvE2j9/sUGUpt9VT8zk4D5ZyH/xaSIcP4T/UQhRlvsWbLelJl/Ch1 PeBCCdjTTEMrjx7ap96rqGOEzUq5OJmaFS4/xDfTHncaelMeI/o3KVQlUAEgsPvWID3u LXhVcfmSQBAaBRcxD+lp7Dw3/a+2/5UPOvhqj+fbI1bvIYkmekcKGvDoex/sSjxlJWDz EUvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=hS8+pHM6zG2r/404Uyn19CNzUJXfPFsX32UdQvovRRI=; b=q4vwbP+4ZoPZDoqbYCEIjx9UWlmhn1VhyLJ5rkYSHUhC+Ixl8oHjAaDqDKIgWbhVHR Uax+AIbXulfl9VcAzF9eSM1RUR7RlCy0QeG1IRcT9Mw/EesNmBjbzdXUwnqYxEK+gMzK bLkbwRtnBgFNfL03nGbzPnu/e6EMQg1Jnnon54bGhCoe223AZoR2UBma9Gv/4nsIPIe8 6iUlpjTe6IQyrHiM7K5d7zqIGsk60UoCpdvcDS4HWjeXUsvVqkdTm8GjAt+3rZbMXokH Nleo7kyhtT/oF/ws5lYepHdiv9UwZPpkZapQd+9I7OQudt3mfUEQ/ZzMkim1LMcQ9cyC pHIA== X-Gm-Message-State: ACgBeo3LLAEHK3F0LLk2OTEklRoT89uml9f7itF6CndxuANXK9f5WKT/ kX9i0RrTPzrxJGvaS1avd+OZLruKQUB3lchAWcu+asba X-Google-Smtp-Source: AA6agR4G56/K9vMYltUxzuEpVCV+exKVXWNAZW/exKaKt1jlLkGs8z6pbEW39GEmAm2+aQRFW0TdnPWAKBZMt+5G7Tk= X-Received: by 2002:a05:6402:3693:b0:43d:1a40:21fd with SMTP id ej19-20020a056402369300b0043d1a4021fdmr26673500edb.206.1660234853911; Thu, 11 Aug 2022 09:20:53 -0700 (PDT) MIME-Version: 1.0 References: <20220810115120.182853-1-felipe.contreras@gmail.com> In-Reply-To: From: Felipe Contreras Date: Thu, 11 Aug 2022 11:20:42 -0500 Message-ID: Subject: Re: [PATCH] prompt: support generic non-visible regions To: Bart Schaefer Cc: Roman Perepelitsa , Zsh hackers list , Oliver Kiddle , dana Content-Type: text/plain; charset="UTF-8" X-Seq: 50456 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 Thu, Aug 11, 2022 at 10:21 AM Bart Schaefer wrote: > > On Thu, Aug 11, 2022, 9:38 AM Roman Perepelitsa wrote: >> >> I like this patch but for a different reason. It closes the capability >> gap in zsh prompts with and without prompt_percent. > > I've been traveling this week without access to the source code so haven't otherwise commented on this, but: > > 1. Roman's point above is valid. > > 2. As previously mentioned by others, this is related to %{ %} rather than to %F, and should be implemented and documented as such. One cannot write $'\001red\002' (I presume) and it would not be generally useful in that context. More related, yes, but %F does do the equivalent of %{%} internally (I didn't know what %{%} did when I wrote the commit message). For reference bash does have the equivalent of that with \[ \], but that's specific to bash and it's converted to \001 \002 internally which is what readline understands. A prompt function (like __git_ps1()) cannot return \[ \]. > 3. Escapes for ctrl-a and ctrl-b also work? Or this is explicitly looking for \001 \002 ? Any possible conflicts? ^A ^B are another way to say \001 \002 is it not? Or \x01 \x02. At the end of the day are the same values. I don't know how to echo ^A in order to test though. -- Felipe Contreras