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 20546 invoked from network); 20 Dec 2022 22:43:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Dec 2022 22:43:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671576184; b=sYVhFl1/Eiq9cb9tUFKsTwbbCpvqmt+0kg2abGbMN3svnMd8tuXifJ5KbdrkQGkk3v4p9Pd06C +JMtEyN4HvHtXDghe+tcxIbFZkptUrynX2o8qPb2KYtBxU9l4hNlRtLoz80uaxzD3AD09xfbL+ KLHyIsrra0Ff2/m1oCj8RTkf6jxqnmfXLX9dcqcdIMMn9Ciq4CpqNnx1DfMOmiF2x7h8Ogi5Q/ fqw+4kQZvGyec7SP7Emkz7iB+zUuUr8gpkv58zHwK7MN65JU7VwfMLeRuNf8JMKqKTlJ2xpl1s sUKREVA7C/jzecIcCGVVhRJqHlXh7DjzFbMmcV5oU6tojg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1671576184; bh=KdhlAdnki+GsViwtZ6q6UDbgLQy+Iu4MZey129nNsXE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:From:To: MIME-Version:Date:Message-ID:DKIM-Signature; b=lJAJB3e+5EtI7takptwJxIuaY3aWWaZkPLHUysNokSTuRGPQSE9+mIgd8g+LawdJ+VMdhYmXzh gTLNt0g6jm6ve2759AmVajwwIZIAWDJ162Z7yVMUZzG+uuVFByeppMfYoX/a5ImJolxaeGCZHO brHcxZ5S1DHEQrkPakiOzMdzEnx7p1HlhXdgvaJRryFpmG0mAbpw/qR64bAUsZK3doPHAxXh/p 90yThL6jSrfNNO53Lo68pBcIf/sH1IvN2s0cs8nAHIHOueirNezLxs1xNLf+WExLtnrek1znoU RN7X13+SzylhZnj1mtJlt0SfDkljJTHMPpWeTzBiLICizw==; 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:Subject:From:To:MIME-version:Date:Message-id:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=mBm9iBbe9sXLaU8v1kJjO+habsrZrWMgXZonJTyM+LQ=; b=YsjdHoyUwQ4IIS0lqdXWwQziDy Azv+Fw+vOUW7KNbhXN4/NMTVPCAYDS6q0bz4CiJ/qIqCCLsYFtQRjqr0GudWOVoJmagamOzQz9zq8 7xywDki3V2CZvMTsd4WYJwDo5KDIDu9X7f/0dQ/RVJ+rU7w6qBMqIYuX2ndeU80jOEWcaG8Il3bNz I6A0j4LQ97Pi5lRBZ3Px8Kjwe4iIsiWoNFjQB09bIChLmlym8qClJdzbxtY9tpeG9pILHYxqBFkQ5 xgVmv0qKWopxNG6upXdYWfCtNrR4iVLBe2pQfAoNB3lnHdWIUOTjVl5IWkzWmu++VpllzvAJadkPO NdVemtCA==; Received: by zero.zsh.org with local id 1p7lKA-0004aM-Jr; Tue, 20 Dec 2022 22:43:02 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:33550) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1p7lIw-0003um-Tc; Tue, 20 Dec 2022 22:41:48 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta01.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0RN70059PML40W30@mta01.eastlink.ca> for zsh-users@zsh.org; Tue, 20 Dec 2022 18:41:45 -0400 (AST) Received: from [192.168.0.4] ([24.207.18.108]) by Eastlink with ESMTPSA id 7lIupQyQIeLAh7lIvpcjU5; Tue, 20 Dec 2022 18:41:45 -0400 X-Authority-Analysis: v=2.4 cv=S7gfgqgP c=1 sm=1 tr=0 ts=63a23a29 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=ee4-kmBtBVxWI2z1bOAA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeejgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfvffhufgtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepveehudegteeiveevieeutefhffelheekueeghedthefgteejvefhgfekhfeigeffnecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: -100 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <71c9c7e9-3f95-143d-fbd6-6575d7f4c446@eastlink.ca> Date: Tue, 20 Dec 2022 14:41:44 -0800 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Content-language: en-US To: Zsh Users From: Ray Andrews Subject: manual Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 28596 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: Daniel was interested in what I'd do with the 'set' man page.  It has a completely different flavor but: 'set' has too many uses: 1): set [+] 2): set {+|-}s [STRING] [STRING] ... 3): set {+|-}s -A [ARRAY_NAME] [VALUE] 4): set        +A [ARRAY_NAME] [VALUE]         # sorting not available with '+A' 5): set {+|-}OPTION_NAME 6): set +o 7): set -o 8): set {+|-}o [OPTION_NAME] [OPTION_NAME]  ... [--] ----------------------------------------------------------------------------- 1): set [+]: Print all parameters.  If '+' is given print them without their values. Where usable: -s: Ascending sort of the input. +s: Descending sort of the input. 2): set {+|-}s [STRING] [STRING] ... : If no flags other than +s or -s are given then the arguments following 'set' are assigned to the positional parameters: Example: $ set one "two's company" three $ print -l -- $1 $2 $3 one two's company three 3,4) An array will be set.  Notice there is no equal sign and the array members are NOT to be enclosed in parentheses. 3): set {+|-}s -A [ARRAY_NAME] [VALUE]: ARRAY_NAME is set to VALUE, completely erasing any former contents: 4): set +A [ARRAY_NAME] [VALUE]: ARRAY_NAME is overwritten by the new VALUE but not truncated if the new VALUE is shorter than the old. Example: $ set +s -A ARRAY_NAME A B C  'dee licious' $ typeset -p ARRAY_NAME typeset -a ARRAY_NAME=( 'dee licious' C B A )  # Sort is descending $ set +A ARRAY_NAME 1 2 3 $ typeset -p ARRAY_NAME typeset -a ARRAY_NAME=( 1 2 3 A )              # Only three elements overwritten. $ set +A ARRAY_NAME aaaa $ typeset -p ARRAY_NAME typeset -a ARRAY_NAME=( aaaa 2 3 A )           # Only first element overwritten. The processing of arguments after -A or +A depends on whether the option KSH_ARRAYS  is set.  If not set, all arguments following ARRAY_NAME are treated as values for the array, regardless of their form -- zsh will attempt no interpretation or expansion of the arguments.  But if the option is set, normal option processing will occur and only 'regular' arguments are treated as values for the array.  This means that: $ set -A array -x -- foo ... sets array to '-x -- foo' if KSH_ARRAYS is not set, but sets the array to 'foo' and turns on the option '-x' if it is set. Note that 'typeset -A' is quite different from 'set -A'!  If you are copying an associative array to another array you must do this: $ typeset -A NEW_ARRAY $ set -A NEW_ARRAY OLD_ARRAY ... otherwise NEW_ARRAY will not be associative.  Be warned. 5): set {+|-}[OPTION] Turn on|off a single OPTION. 6): set +o: Print all options and values formatted as commands. 7): set -o: Print all options and values as a nice columnized display. 8): set {+|-}o [OPTION] [OPTION} ... [--] Turn on|off the given OPTIONS.  If the list is followed by '--' the positional parameters will be unset. COMMENTS ON MAN PAGE:               argFor the meaning of the other flags, see zshoptions(1). WHAT OTHER FLAGS?               For historical reasons, `set -' is treated as `set +xv' and `set - args' as               `set +xv -- args' when in any other emulation mode than zsh's native mode. DON'T KNOW WHAT TO DO WITH THAT.               If the -A flag is specified, name is set to an array containing  the  given               args;  if  no name is specified, all arrays are printed together with their               values. IS THAT CORRECT?  SEEMS TO ME ALL PARAMETERS ARE PRINTED NOT JUST ARRAYS.