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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26983 invoked from network); 1 Apr 2021 00:01:08 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Apr 2021 00:01:08 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617235268; b=pPTxM4LkfgDh4iIXPGH26AE4l1xWAhinO8mJspwPn3418yJpyclWTyGFk083M/bi5Ca+DfvOCC SHvveQk5/RQfFD9Yich5cfq4Dccj089i8TpXlNnRh+wlwrWcTKyRRKU1txc/NpwtYE/kuMApqP fNOr9SiV2BqryloRQI5rbRchvZF3YfdAD8ptLNCpxNBtrI+WqiQ7hg9R+l/Z1ncTZ8NWeGBhx4 IiyvDpNqWnBZJIjQWFft3tqBM8qdGxNfyltiFB6PKSxsX5PIlrSRMe5hrogw0JbzaqXttZuMXo /4nxGDeWqS+5EBFeTNTXpwM0OAOhLS1N0MjEhU0bIbyBWA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout5-smtp.messagingengine.com) smtp.remote-ip=64.147.123.21; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617235268; bh=7MJyZssl5E4bCkL4MVuXKP9CEa5/uBgQH8m5cX8zz7M=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:To:From:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=vHT0cdyMLU7zTTQ3U6nygm+UHVzCq1uZiupt8hosIv9LoXGB+nS7LHxuZY7LWDck9oXyqjUZlP K8v3fMzEUWqWXWUCyCg8nnR6SdrGVrPIJHXXbejL+CBYRPCOAH7Ug52LceYTIhQ3WYn8ipgLYW GKJX/HprM/aVT0W4TuiD1UiUKFf3vg+751zl2+5WHmM7sxvpJKkYlh2KA79WMwjuC8Doa3wmF6 nJThCtd3PEyrluTtRcsRwxHQFmXeafxxidsHQzZ5yDXphwrO8YYsSRycr2ex+lESPrloDS+pF1 yTUjhUg2iF7nb2qMViZVe5nmlchBRyCPE+kuYUCvUmHulA==; 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-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=PpjgkUs7/fTG7yg6RW/m4Qw1Yp/FRLBf04NxMp5YErU=; b=uXFhqoyJOvzpr5BtO2NeMgm1kz iPqBNBJm+CQfVgVZu6QNcjEk216LKKiXz5uNrCwL0Mom9HfxlpsSbdbzJtdC7jQxAIUzKQVTPT846 +8lW6eqPoiC3j1JfWSAXxUsF2QOreHS5pfHaXuaojedQo6xrtWle6QYkpG3AzDIdSQkUVmln3CO1B tm2LGk76buQtnQQUVm86Q0mnYPX4Cu8HwKmogopJ6fbE2V4//aUpFyVwzji4DiJqbULWtQEcU3zOX ZaF0emrtNKQ6qeERI+r3zQPhnSJYipVUI6VjkYBCqyeCanfh0PvYRTOVb3ljCJ7kMNTUm5XQFbXWH J74IWr8w==; Received: from authenticated user by zero.zsh.org with local id 1lRkln-000G5x-Rr; Thu, 01 Apr 2021 00:01:07 +0000 Authentication-Results: zsh.org; iprev=pass (wout5-smtp.messagingengine.com) smtp.remote-ip=64.147.123.21; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:58683) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lRklH-000FfV-Rj; Thu, 01 Apr 2021 00:00:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 636F430BA; Wed, 31 Mar 2021 20:00:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 31 Mar 2021 20:00:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=from:to:subject:date:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=fm3; bh=PpjgkUs7/fTG7yg6RW/m4Qw1Yp /FRLBf04NxMp5YErU=; b=gli+Hhnr7X3djFLWudlOe0v6PI58mau3j4vjKPOI+y 9r8bbAJc8rgNAj0+E7cyKvsYx46MXp9lQqok7kntLBHFohRM4S2evWbJBw+WmK3G H+4ynRVHP67Ew98OcOT8PQ8mgdyKotNsb6RW0et9OHFCYoCa7vSdJwNDTUo+RL/l fgOxE9ohdPlEEDt0hurtEW1ht6uTT09w1Uv5KYzsV8ON1grIYbWs7wYswjjp8DtU 560xeDmorDebTKnsgMS8he6SgbCFky3zEeMpbp8GaQuPU1OgafV5p0o43v9MVGXF p38jEmLsPppaHVDcsX72WEYz619Gj1zJtQPYXo7qLxyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=PpjgkUs7/fTG7yg6RW/m4Qw1Yp/FRLBf04NxMp5YE rU=; b=Yh8JYpbK1HyPdmzUzasOtwARcEnv9U4Ie/YkQpDPnHnno1JJd2A8zdR1U Jvwj7NFV+FWALpx99hf8ID7LNApBx+M+uNnbHxSH0DkJmmjHzdMiDjIKvaMwXhdq stsTc4nw64rxxHqtFzeSQEokJIwWJMp5ekHv1o9GMtQQRkTj9Fztk5J4+40rraKC eN4Db5qknY9L6+PbiBRa3W72Ar5cL/3wqK1h4OFoEyTvDy5/KG6Gd3QGQM6PR0BG ORD80F+fgc2K+7p112RSm/gVknfTJYzxN1FVcoZ+MAB89RS9LmFPXYYAKvboPgvI 7kP2x/6iv4IFLdMLVJ/PLkAyNPHGg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeifedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhggtgfgsehtke dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpedtffefveeuteeuhf eljeekteefleehgfejtefftefgfeeiheeuleefffekleelgeenucfkphepjeelrddukedv rdefiedrudekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-79-182-36-181.red.bezeqint.net [79.182.36.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 817C824005D for ; Wed, 31 Mar 2021 20:00:33 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4F9jxW4x1QzmK; Thu, 1 Apr 2021 00:00:31 +0000 (UTC) From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 2/2] ___arguments: New completion function for __arguments. Date: Thu, 1 Apr 2021 00:00:26 +0000 Message-Id: <20210401000026.23570-2-danielsh@tarpaulin.shahaf.local2> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210401000026.23570-1-danielsh@tarpaulin.shahaf.local2> References: <20210401000026.23570-1-danielsh@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Seq: 48362 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: The new function, ___arguments, would not be called by _default by default, nor by _nothing, nor by nothing, but by _normal — at least, if the normal _normal _setup setup is used. ___arguments could also have completed __arguments by calling _arguments without arguments, but then nothing would have printed the "no argument or option" message that _nothing prints. I assume the decision to have ___arguments as a separate file, rather than simply add something to _nothing or have __arguments complete its own (__arguments') arguments by changing its first line from "#compdef _arguments" to "#compdef _arguments __arguments", may be somewhat controversial. However, while there are good arguments both for having __arguments completed by __arguments and for having __arguments completed by ___arguments, let us please have no long arguments about whether __arguments should be completed by __arguments or by ___arguments. My argument is that a complex argument about whether __arguments or ___arguments should complete __arguments' arguments would take time and tuits away from reviewing the arguments to the _arguments calls in __arguments' completion of the arguments to _arguments; that is: from reviewing the arguments to __arguments' _arguments _arguments' arguments completion calls. Review-by: Matthew Martin Thanks-to: comm -12 /usr/share/dict/words =(() { print -o -raC1 -- ${${@:t}#_} } Completion/{Base,Zsh}/**/_*(N) | uniq) --- Completion/Zsh/Function/___arguments | 11 +++++++++++ Completion/Zsh/Function/__arguments | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Completion/Zsh/Function/___arguments diff --git a/Completion/Zsh/Function/___arguments b/Completion/Zsh/Function/___arguments new file mode 100644 index 000000000..187ae644c --- /dev/null +++ b/Completion/Zsh/Function/___arguments @@ -0,0 +1,11 @@ +#compdef __arguments ___arguments + +# Dear reader: This is the function ___arguments. This function is the +# completion function of the completion function of the completion utility +# function _arguments. If you're looking for the completion utility function +# _arguments or for its completion function __arguments, whose completion +# function is this function, then you've come to the wrong place. See +# ./__arguments for __arguments and for pointers to _arguments. + +# Unlike _arguments, __arguments and ___arguments take no arguments. +_nothing diff --git a/Completion/Zsh/Function/__arguments b/Completion/Zsh/Function/__arguments index 40a4e4b60..444a1c809 100644 --- a/Completion/Zsh/Function/__arguments +++ b/Completion/Zsh/Function/__arguments @@ -16,7 +16,7 @@ # source code, that'd be either in ../../../Completion/Base/Utility/_arguments # or in ./_arguments, depending on where you're reading this file. # -# __arguments takes no arguments. +# __arguments takes no arguments, as ___arguments would tell you. if (( ${words[(i)--]} < CURRENT )); then # "Deriving spec forms from the help output"