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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21017 invoked from network); 17 Dec 2022 07:50:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Dec 2022 07:50:50 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671263451; b=W9JIw8TtJU4gElDbSdcIgLS5Ar/iVxGgUh2lB/DpvZ0JgH4lgAgUu2tNFyUQZc6pdHyLiJisWc emmCj2Viix8g9c0DQpsgQBnnttANfhIW9BkLJj3QyTMdnhKhB0eppfZIMKE79adOxb7JT5XbPe itGJ+vdBagaQhBkp0YIqAD+dX1omZ3PW7FeiEdfYRdPqZWBR0SkFwAMUMuEGmQFU+VccVKth9A Dze5b9jSlDZ6GXH9wy2BJqUH/D5e9hM2lJdYXPX0odqy3aRWBuKCqQ7XGGyX1SddtEf+M2q42t y9vTROqVh1ln2eg8f6TiiCkPuX0rHunXmhe0zElYNBCktg==; 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=1671263451; bh=VEFWsh0ujX2MIYzJUN0chIDFNIXPklnoMDPoU36Z/sY=; 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=Ud0D7pbcMP4DL4gMDDF98hJwwfIUrCVRZyNDvo12NRaYIlK+DynJmKw0L0Jsd29656J9Pndr1S EkjSuJecjWkBfdY1ifLLEoI59fuZig7xfOQfaxI6VmTo7V93JgX7CdoNswISx+B3cx/EZJjY78 AtUaxwVVb74HFCCLb2fUICfodZ46BEXpFuc1ceYQEb6Bk+oqlZofjoewFER6s5xj6oMpRK1n5c o+Yz5fB9B495uxWIpSn3SOVSPQpuzEZv06tAO2+36l1Zp/WpaliZlWbdFeSN5kMhcj/Busi/Im Js7d3eZvYoLAvYQrvdRjwJPlrKe9nCRM3vl1M0FPgrBW7Q==; 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=NTmEkBZ/VDux1uofme8R/MaaHhhC9mhSnebhqRZLYIk=; b=Utqs6h5xUljERWs1cami1i5zKx A0ELeBtOSttXXNkFmElgTEtx9QcEWaVri4IxtxVWqsLqwl23OhiGbjFm2uM6OJTy1kkWIoVHNu8QJ i8LxIyDrDhqnurDv6BrMtjUq0GuiNk7DNTcYc0sJSlnXDr9IHilw75iENFIUtF6NYLLBwhK37EvnU 3uZSK+5veG8mElGVSfXuXw3T2CxPJD/MvY59TlrUu13QoKaATDBgvg3Z58fKcpFQmYLchLZ23xmRy nrdnEHhgZHYype5l+gVa7bGxRSN7AzkGDqv8GMCjk1Z2upCfMnZ9yrvZKEQWwiirpUCEWzsX+tY7t JkF6WiGw==; Received: by zero.zsh.org with local id 1p6Ry4-00016B-Oa; Sat, 17 Dec 2022 07:50:48 +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]:45603) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1p6RxX-0000mo-33; Sat, 17 Dec 2022 07:50:16 +0000 Received: by mail-ej1-f45.google.com with SMTP id fc4so10940930ejc.12 for ; Fri, 16 Dec 2022 23:50:14 -0800 (PST) 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:subject:date:message-id:reply-to; bh=NTmEkBZ/VDux1uofme8R/MaaHhhC9mhSnebhqRZLYIk=; b=qwAO/yN+UKRgxYLWphJ/nGvlTwZ6YNxIWbX+AN2wvggXSrdIbsf0F5Ro+vRLBLlfeM khuV5muSIxeel1DzBaUPpJhWAqhFHt96A21DDF3FRR31HuEGAcWlMjiZxYc3qfwgKECK Slc1mpholgVgdh6EwH+M0xMgyVVR7pw095ahlaT1XWfy2C+gwbGB2icRXNP6xVL8qrZp DjLPBr/q8yq7r7NVPbpLf8Zpe6xoREv+UxV+NXQQMouWb2aHgqi6NYgyWwWBEJvDxwAX HrNxKJjSLgZs4wKfneW3YgEN3Cju14j0rKUtqeKGPwor3h3/ctzLpK0OoExLlOtiYfdQ g/NQ== 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:subject:date:message-id :reply-to; bh=NTmEkBZ/VDux1uofme8R/MaaHhhC9mhSnebhqRZLYIk=; b=W7r1YfYT5JVyN9PO1XO4kuZr5MXXZCT2xeJn4DTzNX5KTKvpE3QcY4B+M4CewoSzZO d6K8EhTD987BYoSDeureTHXmwklCg6kYxkZUJhJ4bHeWykJeSj2vJGJ55k/TWtX4pC/I +n8x+kt9GwtF0La8MKNpB0F55lI6dcBHmnba6Jx9Mh+BSB+cQ0Me3yV2TNlSWbBMXaX3 87FbkACXD4oYSo9pSWN/eStG0jiAL80HglDMMdVPToXzWXxOV8pNfYyfQZhRL7bPuWPy yhh4Qtz+dbQw+SFrcWZn00BMO7IOE5X47841F2MHSpLxb1ML6FNFAGK3EXNMePPzVpcW Q/MA== X-Gm-Message-State: ANoB5plcqo5xj+1td8ZtYB4opwdRtF+MuG/n4mSTaRLsKt6XIKmJxLAp 7IXKuzSRdrGvYUt0niabdkZjHXAP/z7/pZeQIa58WaQqAz/pv5nM X-Google-Smtp-Source: AA0mqf4GzOHzIOSJklj9gdlM0wMS3ZNd3sh4asqYgy8EKjBTrofTq7xhl5GoxuNf65jfxh+GU86OGeamO2a/qmgddas= X-Received: by 2002:a17:906:9bed:b0:7c1:31d:315 with SMTP id de45-20020a1709069bed00b007c1031d0315mr12997563ejc.389.1671263414489; Fri, 16 Dec 2022 23:50:14 -0800 (PST) MIME-Version: 1.0 References: <37998-1671237833.378022@KQt2.DuNm.SJtt> In-Reply-To: <37998-1671237833.378022@KQt2.DuNm.SJtt> From: Bart Schaefer Date: Fri, 16 Dec 2022 23:50:03 -0800 Message-ID: Subject: Re: Turning display attributes on / off in prompt strings To: Oliver Kiddle Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 51231 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 Fri, Dec 16, 2022 at 4:45 PM Oliver Kiddle wrote: > > Bart Schaefer wrote: > > you can't mix in "raw" sequences for attributes that prompt.c > > doesn't "know about" > > It can also get confused when you assign the results of ${(%)...} to a > variable without printing the results. A consideration is that if we simply replaced $"\e[m' with $'\e[24m' and so on, the present prompt code would still emit the then-unnecessary sequences to restore the other attributes. Is it worth the effort to rework that? > I'd be reluctant to create an extra setopt without first having evidence > that terminals that need it are still in use. Agreed, I was excerpting Mikael mostly for "would [not] lose a lot of compatibility". > And if we need a way to > override terminal settings, something more generic may be better. Would populating a writable special hash parameter be a security issue? As you implied, though, the hash key names could be tricky to choose.