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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23458 invoked from network); 19 Jun 2020 10:57:29 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 19 Jun 2020 10:57:29 -0000 Received: (qmail 6447 invoked by alias); 19 Jun 2020 10:57:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: Sender: zsh-users@zsh.org X-Seq: 24936 Received: (qmail 948 invoked by uid 1010); 19 Jun 2020 10:57:17 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25842. spamassassin: 3.4.4. Clear:RC:0(66.111.4.29):SA:0(-2.6/5.0):. Processed in 0.811653 secs); 19 Jun 2020 10:57:17 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejiedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefhtdetfeehveeutd ehuddtieefgeettedtjedtffehudeiieejleetteekudetheenucfkphepjeelrddujeei rdefledrieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Fri, 19 Jun 2020 10:56:40 +0000 From: Daniel Shahaf To: Sebastian Stark Cc: zsh-users@zsh.org Subject: Re: Dynamic parameters for PROMPT_SUBST functions Message-ID: <20200619105640.17bd3107@tarpaulin.shahaf.local2> In-Reply-To: <20200619063233.zybs27xvqp56t4p5@singold> References: <20200619063233.zybs27xvqp56t4p5@singold> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sebastian Stark wrote on Fri, 19 Jun 2020 08:32 +0200: > I am trying to have a function call in my prompt that gets the return=20 > value of the last command as a parameter (%?). What would you do with =C2=AB%?=C2=BB if you could get its value? > In this example I write the parameter to a file, because if I just print= =20 > it it would get printed as a literal %? and expanded later and thus hide= =20 > the issue I am facing You could also print to /dev/tty. Cheers, Daniel