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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14256 invoked from network); 12 Feb 2021 00:10:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Feb 2021 00:10:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613088633; b=1Sw8QiDjiT7ExIP+naUz5v8/5yI8+yESZEssvI/si6iaQnYUmGv+slQqal93wwvtvBiE7SHosP OzXeId5UTqk6rEVUjqPzsEnnNH/NwI0Pwn2LRr0CHDAUKXKpMPdd+UckbOhBbpa45P+QA6Blx9 Z7VnmsZc6qgNRL9IPBjT+s4KDLJ6Otlzr4DULVeeMU5JfQNKIcRU7ZistWTcjM+5LQBQ1j9ZoT ZEXjv1z5f2MzMq72BRupjR3i7Qbd/5RvFLC4wrbCUH0kKMlo+2yNASYBndeFFXqS1dRrlD+VWG sOqCx9BUPpTAvYSHg6/Jl5QvthOAZzC96XcHUH/6COJllg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1613088633; bh=YQu2pLwwmHevSB/lIjLRvEDtZM4L+LEu3oizBgye94s=; 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=e0x6rEbRkkfjOlGNyt1xFc971ykpnlhIkyAD/Nx1B2rpjiIHRGaCo4CHEObkCZWF4GU9FArhBN BVy9R7hbu2m6PtbaiCmRMdcyGxe2fEzEOL3AMjBVlv6WeVCVxugRjzPbDP3hcR6amqzyAxPwVp eVPlOeCRXWAouClf+R4HGBsDCb9jDYMJdRjpe0LBhP44MWevuiuHkt3KMQaNEczxHP/wa2Mg1t 4r8QHboo3nX+6ARFw00A7bcIW/DLr1Hplicbc15QUp09VMpSNXlgP5tE2/V9YR4g3UX6bDPl6F ueyp88/6TjECizEseqMRgHf5yDaybyTd1l9Xli/4hStdMQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; 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=zmyAHUuW0HjLzcDU8xih/kfRRVwS6XH+pHluNsXjSRE=; b=X4NnylIhTl3p43GI4UVvN3JScd G6y7Nx8E9R9+nAqb6/7QNPjrjX3LNXIfvOLaFgo/TAk78pAIo1zBC8s3RTgaqzoOUIvipiBPic+S1 ygaUoy5W7WUmpaqHvi7Ww9lfMyGNY72S4eJBzjUeFidXaU+8LbC540ioB7h9O3OoBtcquKxXm0O0O CKCcQeT0JqL7IHfBLj/JcB6zmehK+fnuOB4CXi/UP+ko0qGdfTdZzITa6fsNruAUfgc7Sk1Ys6aR4 ia2gee3ObZvlfuJVUmohadv7HcLNO1DczewNBwMw/wZkyhqQ8z4BPv6iCKOAigme/2WKRpEdkXq7C mmPmO8JQ==; Received: from authenticated user by zero.zsh.org with local id 1lAM2a-0008R0-Sr; Fri, 12 Feb 2021 00:10:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f180.google.com) smtp.remote-ip=209.85.167.180; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f180.google.com ([209.85.167.180]:35916) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lAM2O-0008F1-Mk; Fri, 12 Feb 2021 00:10:24 +0000 Received: by mail-oi1-f180.google.com with SMTP id k204so8216718oih.3 for ; Thu, 11 Feb 2021 16:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zmyAHUuW0HjLzcDU8xih/kfRRVwS6XH+pHluNsXjSRE=; b=zvbu2Oab2nlcpm5AVV4nSk4+KX6ZxLRsvCZfxY1DtGC/Jj2dYEuO8Bm/GyMUKtZBpQ 5XT4hE66Cl5/lXp4EQFrzQ/LPt6uhsqXSwHrK9yyUsKmpnYbZ0S5X53TSqTMLbpFVpSx H3tSDi+EwSzkMIB4+3T+re+Ow5IgAOFBQDFP43frT1yhgk7wFx8PXsHmP8WfaizN5N53 j1wi1XBVsjy/25YfTFKVjAZNvcgHjQZ1qUy+VU01NQiI7Mw8M0Z2cfn9WEhROq9yZYql 5b5IcWHVE0Q8toLTBqHTNjuH5t6NCVclfPLenEztIpRoycwJt7DwZYa1f2jr1mK69zsG oHCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zmyAHUuW0HjLzcDU8xih/kfRRVwS6XH+pHluNsXjSRE=; b=qElCLTwgc/TDzbFwX9ua+rN3K8LtR+V4QW1neqT8Ptp46Zb1allvErgxc5yhL6UwvE ++RdYL2byUGYvwaEO96kVmtdfQNtgMRtSeiU1NI8eG+lDBcc8cbxcSR7wiTGWlvObYzt Q03ctcbGiobahZoBRemvirMzaQD/T5YYHiMDmNOJqKUnYOPbtO+p2oHYZdZRE/g8/umv m/3AZq3ME0sO3bQPgnx4eW4R0psAu5slOnfcT2ypGxcN2McBcuFvk8W7TvjQhvyhYsN3 1zFfjQXapJEDHdtL8BiwEdd9KGrL0E4gAg7OkZNvqRlbACZm0kGxWoOKk3bVc8KTrVO5 EqHw== X-Gm-Message-State: AOAM531IYf/VveEGCgIfycjDwY3n9MCLp53T6UPXmvSMm/i/ObAL+Wnx VUcQRBFfxfnpWKgDtAxGAUtRkj3pO91OLYC+gud8eA== X-Google-Smtp-Source: ABdhPJzSG/d1PgcGAHovCLYzoNLwy19uDyFWjmkeLX5zeV7/jY1kmEyteWWHW3UXDsl1nUX/7YToXhBt6xKWEh9jH44= X-Received: by 2002:aca:4e8e:: with SMTP id c136mr227943oib.173.1613088619415; Thu, 11 Feb 2021 16:10:19 -0800 (PST) MIME-Version: 1.0 References: <0102017778f35f33-a962e4d3-83e9-4d3b-a0d7-45701bb40b11-000000@eu-west-1.amazonses.com> <8BA25288-0FFB-4FF4-9799-541D6A3C52DA@dana.is> <19996A10-103F-4054-AD57-FCED8E406687@dana.is> <86782FA5-6EBB-4FCD-90AD-D33F352455F1@dana.is> <5C018E61-8E72-4647-8A53-0F9D5BB82146@dana.is> In-Reply-To: From: Bart Schaefer Date: Thu, 11 Feb 2021 16:10:08 -0800 Message-ID: Subject: Re: Rewrite of zsh-newuser-install To: Marlon Richert Cc: dana , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48006 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: Archived-At: On Tue, Feb 9, 2021 at 10:58 PM Marlon Richert wrote: > [RE prompt truncation] > > Would using the actual ellipsis character be OK? Or do we have to > stick to ASCII? We probably have to aim at lower-capability terminals. I suppose it might make sense to check [[ -o multibyte ]] and assume the terminal could handle the ellipsis if so, but how would multibyte become set? In the /etc/ files? > > > setopt PROMPT_SUBST > > > > I think most of the devs discourage PROMPT_SUBST. If nothing else it feels a > > bit advanced for what we're trying to achieve here > > Why exactly do you discourage the use of PROMPT_SUBST? Why is it a problem? Here's one reason: zsh% P='${(%%)P}' zsh% setopt promptsubst zsh% print -P $P zsh: segmentation fault (core dumped) Src/zsh -f Do that accidentally once with PS1 or RPS1, and you're locked out of your shell. The main thing, though, is that it encourages the prompt to contain $(fork something expensive). If you have to think about when/where you're capturing that output, you write better code. (From another message) > When using $PROMPT_SUBST, the prompt will automatically adapt when I > resize my terminal window. Granted. It would be nice if the character-counting ability of %(l.t.f) could be used in the numeric argument of %>x> and %