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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6232 invoked from network); 15 Aug 2022 01:06:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Aug 2022 01:06:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1660525566; b=O1UZ5o6rGDZjNEriOgyYz1aI/Kph9oQ35MfULTmQC5n7326RwXjsGepDWJx1Y036sllTenMZI4 X9g35K/w1fzh8p21dZ21/Sxb+NDptwY1nK40jLDu8W7OYnfXPSyNUnalcFFEfMP2L8Xs7Vy2cj CZow0HtH70vlpxuIygunzAAoWMTrFq14FzI+taWkixZYQbZghURUhMUbM/1cB1pLUVAqMxQvXx i/GwnbOSkfEZafOfAITe37DfmBHBFPgACtjVxWNdDyntN0bLKmxokMyGvX9LEsJWV7xH/w8+L9 B55BmSsHSgLH9UQO1qZBHJtqtEb36hEbdKxw2d90NhPVbw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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-20210803; t=1660525566; bh=mGrIL1ymQUNsDF0fo2EX3v8fkou9AeEf2Rm8SWfrrx8=; 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=AGsq3AsKHO1hjwX7mF6gZDGqBz/A7Rd2cWK4t8h0Oqr9P4XpegBn6mlx8dFBsxR7TnQyquExVp hmi9p8AiYy5JqeeK/NSWj8NHRYxFRSnyLvyBNHKlbiJbAdrkp3mn9nTlRWkehyHIktD2SgSXIB 1lFIsAYCpfgpLiFK2QvnzE5JrgvAbRq98cF4TFlrtyqXoEytF+ion/wiuCFXdMY3DL5r/8PnDE KjaWSRJDeGfqumcfATGQZn58xR4OgWHz/sA9bH+auFW2iBUMh+iWitAdUS7vUMdS3Lz5GZsFuQ 3FHyZawWj1Db/9i1TkqHGf+76zwkW6LMPjjQcAX/0EJoEQ==; 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=CvjnhD0Cq/dqVZY/2mWI/u336rYm4jjvbyoXhagk0nI=; b=hlLn7Nm8Ds6j4H43zvIxyENk7G /OzDUi4+c0acxkhzfpfpsaztqr1HVM1owsyL4rU9KTkeBqU/uBXDZSBnTeSrnGcg6pAfnZ93vdJqi OTa5GJoz27FFSC9NJcNgVtmB4ukumxqL08aGcVBK5kYyGw/rmvVPIDFp7y/mTDrMu4uTGcBm05n0j DCCuJzOzS8J9E9NYlcZYdVK3qqij6w6MHAlLBcmYN4bTrefcvy7Rb2y2A8aLKrBHChDVpnqGSNKkx aHlxF+XIN/xj7+zzMPBiDRukPAQ8l6dTiYjGzya1yLunNwGPsTO7e1kCXVOEbeBaMLcRZp4plC4NS Ef8oEo6A==; Received: from authenticated user by zero.zsh.org with local id 1oNOYM-0002DV-SF; Mon, 15 Aug 2022 01:06:02 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f45.google.com ([209.85.218.45]:40771) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oNOTG-0001lo-6Z; Mon, 15 Aug 2022 01:00:47 +0000 Received: by mail-ej1-f45.google.com with SMTP id w19so11181312ejc.7 for ; Sun, 14 Aug 2022 18:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=CvjnhD0Cq/dqVZY/2mWI/u336rYm4jjvbyoXhagk0nI=; b=nwr4xv8gJD1ahtZ4V7Notz7MPaPHrDs1dIs5GVXWJfVRP9xlaNT8ESi6kzSxdIqPjz EGF1OHSwinPb52ML+csPSm59XVe9oWhrZeVO+LmdA6HRvmNvDAcr1A9vqTFLkNbouYUR Ao8LbiCTrB8mG7pbtY+vCaz13r2hqQu6HPSgdYZewPTVf+6Cd4Ea093xPNeprT2IkJ/X syYWCFFlUcbvq/icminmXFq6XFGueW+od2h2OY8pMURBXsxBuKdNl4AZYfyqFO0FPKX0 I7bOqVgBuTInfmXdtqeyiNSoEX0+rk0g403x+kUq0k16ToJ9Y3SWfw+C1o09atplQ5iz 84ag== 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=CvjnhD0Cq/dqVZY/2mWI/u336rYm4jjvbyoXhagk0nI=; b=FQpEZw9EUxTFqLHkCoX+jMaX9a8arWIwXKfHrXd5khdBeZGo0mr6qyBCWkEvc9jlPs DRvG9vIwDTUPmUaKvuAh+30mioLQF5P9Ww6GroTo6eOjxKXuMP/+bPibOzyHyqU40n8D zxHlpNjpQb5qyaRsfIwbYksU2+s4eNFXkWucLSAtj6NSvHYgUDZsJqyWcFQzPVhDAC0i C5T+iqtBCXMB10be0QFD1JuyFWq/dQvFass6lxmdp8ashlgcjVAcYwhgNmhYWSuuShxS FE/apWTjg8qw8AvC2alotqDFF6jzgc76h0K6BcU2DIB+R2RWDoU8YfdMTGsfnbyP4RYg yMqg== X-Gm-Message-State: ACgBeo1BQ1ZgirksZlb/gMvK4Wd+/zaG9v9Xmjiduq7hLfOhh+4/jfUV BV4ICo5bihoeeQne9j+ihRv4yTFeKyEIiCagzu2+GA== X-Google-Smtp-Source: AA6agR4AKUg0UYQsuvHbwbwCBwcHa6X4lIJ3e/ZroBu2ShgiMPA1GZ+RJgq+i1dS5LUdDWhsEAvZD4bxsHI8M8RSd3Y= X-Received: by 2002:a17:907:7349:b0:730:61c8:d80d with SMTP id dq9-20020a170907734900b0073061c8d80dmr8495684ejc.699.1660525245512; Sun, 14 Aug 2022 18:00:45 -0700 (PDT) MIME-Version: 1.0 References: <20220811230901.471640-1-felipe.contreras@gmail.com> In-Reply-To: From: Bart Schaefer Date: Sun, 14 Aug 2022 18:00:34 -0700 Message-ID: Subject: Re: [PATCH v2] prompt: support generic non-visible regions To: Felipe Contreras Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 50476 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 Sun, Aug 14, 2022 at 3:47 PM Felipe Contreras wrote: > > > How does one embed a literal ctrl-A or ctrl-B in the prompt? > > What would that achieve? Nothing specific, but one can embed any other literal character, so why not those? > > I haven't found any readline documentation that explains the use of > > "start of header" or "start of text". > > It's in the code: Ah, so "start of header/text" is your phrasing, not theirs. > > I'm also leaning to the opinion that \001 and \002 should only be > > recognized when PROMPT_PERCENT is unset. > > That would defeat the primary purpose of the patch, which is to be > able to write prompt helper functions which work in multiple shells. In that case I think the patch is incomplete, because it's not keeping track of bv->dontcount and will be confused if both \001 and %} are used (or %{ and \002). See lines 602 through 628 of Src/prompt.c (line numbers as of commit c5a891a2).