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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21636 invoked from network); 28 Feb 2023 16:30:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 28 Feb 2023 16:30:06 -0000 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:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=mVFiZzqHkM5irF4L8JqKWl1y3wkD6L8Xv5UTSb9vdVs=; b=OsB1VpvQdKA28qx7QDpQ8to7a9 gWsCRxyuFYVu1rZze/xJSBQEEAggKKCsA5CSRJh5fNYQwZhV8Te13p8cmesfB7vTkp8zrMzdHYxPD IEhJXJrruePfb1IMnittSyLKpQ9Xix672u+69ca1anVHFLGyRr8BVTIsbUjmkH/enRTKNs0puAmE6 6xTqrbPXnw5Alrj16OMHKUPthTw1dF1G/Vr8Sw8qQjBGBt2o66l2ZKHZGA7yvphSUB00JHnGd9dhE 319LrGzJ3yet4UWVlCf6XGyFxCBxRI2uuFQY68YhwGDhWgqUacf+Il3V4t3IW3euPd1bfiWP30LJQ NZG60kIQ==; Received: by zero.zsh.org with local id 1pX2ra-000HRu-Ii; Tue, 28 Feb 2023 16:30:02 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pX2rK-000H9P-8k; Tue, 28 Feb 2023 16:29:46 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1pX2rJ-000JO9-Hs; Tue, 28 Feb 2023 17:29:45 +0100 cc: zsh-workers@zsh.org, Bart Schaefer , Roman Perepelitsa In-reply-to: <20230228155525.4186428-1-felipe.contreras@gmail.com> From: Oliver Kiddle References: <20230228155525.4186428-1-felipe.contreras@gmail.com> To: Felipe Contreras Subject: Re: [PATCH v3 try2] prompt: support generic non-visible regions MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <74531.1677601785.1@hydra> Date: Tue, 28 Feb 2023 17:29:45 +0100 Message-ID: <74532-1677601785.546332@Gkr5.eJZU.TqFp> X-Seq: 51494 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: Felipe Contreras wrote: > readline uses \001 (start of header) and \002 (start of text) as markers So the literal ASCII Ctrl-A and Ctrl-B characters and not the \001 etc strings, right? The main concern I have with this is whether there definitely is no use of those two characters anywhere by any terminal for some other purpose such that some user somewhere has them already in their prompt? And do we know they won't form part of some other future terminal sequence? We can find a special way to generate the literal characters but that only helps with future uses, not backward compatibility. I can understand the motivation to be able to support the lack of prompt_percent and perhaps both bash and zsh in some plugin or other. That aside, it is somewhat frustrating that zsh doesn't have full control of terminal attributes in the prompt and I would advise anyone to use prompt_percent. And in a plugin to add bash and zsh special case code, even if this is added. Do we really want to encourage the use of literal escapes? > + } else if(*bv->fm == 0x01) { // start non-visible characters For now, we've not, to my knowledge, bumped our requirements to cover C99, C17 etc so stick with old-style C comments in the code.* Oliver *Except I notice exceptions have crept into Src/Modules/curses.c If we want to consider this, it should be a separate discussion.