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 29646 invoked from network); 17 Aug 2023 15:14:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Aug 2023 15:14:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1692285289; b=CuzmDvM8x9Shuo8waWka1XlQ4MgRvrshAq612asiy5oY0L1+ZVOPRrWDESqYHunCbdvZ2NYtud 6rmXbzFjCL4adyyErKPDH7HCATfq009vzPdnW27Ep0brGT2vLAWrLu7bQqnyaSv0cRUEjY5zNr 1BfNAip9TkJaiciPRtDw5xB09+aU3Fj+qEb0bH60J98L4ulwvkc9gHezIladEVIpNT5bmhdWsi 7+IK2QhyWNU2brU03Conw8FwvXkyfx/C47CEt/Tx0Pp31dTmYX2Izu58bOG40D1kFg0fM+zplQ lCLWdRAmvtZ4uMmOuQdBRrdwjfU4V2r9Vd6BXelN4bhfLw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (csmtpq2-prd-nl1-vmo.edge.unified.services) smtp.remote-ip=84.116.50.37; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1692285289; bh=cPLmUsL4myTxrnFLmnkWBbd6VXzEf2paIH/zRSE/whA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=cXruixQabTX3fyNaeMvXxvWPKPRPf+x0fVFLAXAMsSVaijHwtudcU3zWxUjLg/Yglwc8PdcZbM 0eJRHZtj30d1uVe+zjkyZykxXL6jZeh7V5tjS9g5hGg27Hwyi1a8FfjQ4eyB08BpEZR0WjRLJ5 lly0Pzj7lEvD5ml0T520Uo+YJ/GmVVxQmKf1bbYP+ao8ucPv3/Jh0ZlLzxBSO3irYDmwQrJQ4G MhEatqeEIbpWDn0igxuDAZfZ3HEut1dAmkdbifTN5JNMzrxWuCVK31pudO1mYIseu8Ug1WtvpT dj9qnG9vxmwcwmvb1dL+QJl1clBFPMDoGlNcfSUlInF2sw==; 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-Transfer-Encoding: Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=oJcUknnQvvU85voAr6IdMJxOuHVh9KorTuadV5ew40E=; b=JkYszn6BBDPPqGShBJLN2n7JuS JicbHcZofc7H+MbSC0Z+AyBafqNsCFcWeClKNaJh8SSRHm1nnZEZXYg38q7Gt9YjWOZB/SwUGRS8N VWzASvxF2QY7FzejWQdua+8lLu60L440v4AAf52C/kE3IJZ//hCRoe5smaKrZMu7E8lxDsCsN4DaP EcLlde9cB6dmcCC6vw6lOia8i6h7gcF7pgo38m2QcGnH9LkAeJNzI2j9VGtrUca2yjV3x1OmCqD0Z H3lko8OA32J2iPMiEm0bfEkE/bJszHyYVtPhJass/wEX0kma6Y3+4kTxVU9pamkimJ8BS0TbQFg6G VVFJ8yiw==; Received: by zero.zsh.org with local id 1qWei0-000Orc-Iu; Thu, 17 Aug 2023 15:14:48 +0000 Authentication-Results: zsh.org; iprev=pass (csmtpq2-prd-nl1-vmo.edge.unified.services) smtp.remote-ip=84.116.50.37; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from csmtpq2-prd-nl1-vmo.edge.unified.services ([84.116.50.37]:49949) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qWegq-000O7n-IL; Thu, 17 Aug 2023 15:13:38 +0000 Received: from oxsmtp2-prd-nl1-vmo.nl1.unified.services ([100.107.83.137]) by csmtpq2-prd-nl1-vmo.edge.unified.services with esmtp (Exim 4.93) (envelope-from ) id 1qWegp-007grM-Hf for zsh-users@zsh.org; Thu, 17 Aug 2023 17:13:35 +0200 Received: from oxbe16-prd-nl1-vmo.nl1.unified.services ([100.107.83.152]) by oxsmtp2-prd-nl1-vmo.nl1.unified.services with ESMTP id WegpqcDFzg1cUWegpqXRpg; Thu, 17 Aug 2023 17:13:35 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-users@zsh.org X-SourceIP: 100.107.83.152 X-CNFS-Analysis: v=2.4 cv=OZ9eTDfY c=1 sm=1 tr=0 ts=64de391f cx=a_exe a=savx3FL1nYZrL0JKOYJTMg==:117 a=IvlwODmuRu4A:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=InUrXy-AWGf0iC38aVUA:9 a=QEXdDO2ut3YA:10 a=HbQOABYz3jhqdZF7JfnK:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1692285215; bh=cPLmUsL4myTxrnFLmnkWBbd6VXzEf2paIH/zRSE/whA=; h=Date:From:To:In-Reply-To:References:Subject; b=IOfDOuYXfNChvGWgOdkOu4AV9/EvvlITRF7I2F6OEIP2Vv4Gp37P+nW0OcMVvbLoB PTr9YQfEDGU1FiSKiK23c6IDHnPi+AKgTsviBki8s3HYvbBBWdiyDS2R07qP4qiRn3 AJMUCRuGtHFoiey+lvKOmwBMafl8zcjLcEAJXB/SkvEwh6plxUO788UQTppVN1gzRF dcuRFlgpC7rAbamypNKu+oG2U6EH8VzeYW8j5HD7QxKbTCR34i5zxd/3cjQccKZcp8 jaa4H0H+xuurBSLztV6gScqn3Ugp+HAhQU6VgyJf2V0Aw+NIgiC1bQ3DlTqEIST85p GTibQCiVP8p0A== Date: Thu, 17 Aug 2023 16:13:35 +0100 (BST) From: Peter Stephenson To: Budi , Zsh Users Message-ID: <785434724.2472140.1692285215448@mail.virginmedia.com> In-Reply-To: References: Subject: Re: Zsh can't do "echo -n" preceding vared MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 147.161.224.196 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfAEdUlfeH/DRb5oDBodbZpVFhpEPCpKDF6P6TV2BZXlnn141BBjLHVa5Dx5817sx2fvK6dHa7vziayjfICERiEUHOiiL9mlZhkEKL1YwpephrdOQmtF/ /DrCj3c76x3mg0jjCksJFFOOPikLW1TvRVrxmuK58IOse+PgCUZGak3gJC9nm63XPxCnQ/v50Tx5Ko1Zowz7G6CiIilkOuL5ASGacm680cXUrXFTIY/HXwKM 1l2WzlBes/eV2J3hSKaxgn+8Lmv6O1X65tmz6iXntJQ= X-Seq: 29156 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: > On 17/08/2023 15:45 Budi wrote: > How come Zsh can't perform echo -n that precedes vared , as > output is only the vared variable's content preceded by none ? So it sounds like what you're trying to do is output something on the same line that will be used for the vared, but without it being part of the edit. You can't do that by default as the line editor takes over the whole screen line and will align back to the start. What you can do is use "vared -p prompt" to output something at the start of the line, which doesn't have that problem as vared knows it's there. Another thing you can do is set the NO_PROMPT_CR option, which stops the line editor from performing the carriage return. It has bad effects if you are editing multiple lines, however --- this is the difference from other shells that is the reason for the usual zsh behaviour. If you're sure the vared will only be on a single line, you could set that option locally in a function. However, I hope vared -p is what you really need. pws