Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Completion batch #3: Break _flags/_modes out of _chflags/_chmod
- X-seq: zsh-workers 42214
- From: dana <dana@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] Completion batch #3: Break _flags/_modes out of _chflags/_chmod
- Date: Wed, 3 Jan 2018 18:14:05 -0600
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1uoJGgtoTzUkXgjKrE/lrJxkTejuOfEAn+XaaFg9WMI=; b=P6WtigdKUs1JPck0SS2zYAP1m1WgA7jJ3ufkD1isQ9kgMaX7C6o32a9YvjcSNoOFXr QiUMLbDd8H606+hnRuvuunWek5rFqxWCXK7DwREKWvsgmRFOzLatIEQhe/GMJGYgRMg2 uZ4V5pxfxmACrbgwtW4wFEKm1TqMY5EqZZo9O9XwN1EnN+uOOi8UMBClziiwUcvx04O2 KKwVppahVUg0dQP4OwWM5MH6F9JzU52vZD6j9ReopdpKMyeY66QjawM+NvtFlAJkVh9K hxDH2CziBe8TIg613gl+PffbSznXpx+EhnAf71ZWGW7Hk4heA/Dijn0/zBvW5ZA4ByXf pdbA==
- In-reply-to: <CAH+w=7ZHwcRfpz9oeDEXtOtF9hNAiujmzHwicZ3Th30gTKmuCA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <48C5B9DE-16A6-4987-8B1B-1CDD20C50B0C@dana.is> <CAH+w=7ZHwcRfpz9oeDEXtOtF9hNAiujmzHwicZ3Th30gTKmuCA@mail.gmail.com>
On 3 Jan 2018, at 18:06, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>I wonder if it might be better to call these _fflags and _fmodes or
>some such, since theoretically other things than files could have
>flags and modes?
I considered that, but the other type functions seemed rather vaguely named
themselves, so i thought i'd stick with tradition. How about this?
dana
diff --git a/Completion/BSD/Command/_chflags b/Completion/BSD/Command/_chflags
index f97d1cdd1..924b09acd 100644
--- a/Completion/BSD/Command/_chflags
+++ b/Completion/BSD/Command/_chflags
@@ -12,7 +12,7 @@ if [[ $OSTYPE = (darwin|dragonfly|freebsd)* ]]; then
fi
_arguments -s -A "-*" : $args \
- ': :_flags' \
+ ': :_file_flags' \
'*:file:_files "$own"' \
- opth \
'-h[act on symlinks]' \
diff --git a/Completion/BSD/Type/_flags b/Completion/BSD/Type/_file_flags
similarity index 100%
rename from Completion/BSD/Type/_flags
rename to Completion/BSD/Type/_file_flags
diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod
index 80c6f33ca..af64b9eb9 100644
--- a/Completion/Unix/Command/_chmod
+++ b/Completion/Unix/Command/_chmod
@@ -3,7 +3,7 @@
local curcontext="$curcontext" state line expl ret=1
local -a args privs
-args=( '*: :->files' '1: :_modes' )
+args=( '*: :->files' '1: :_file_modes' )
if _pick_variant gnu=Free\ Soft unix --version; then
args+=(
diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find
index 2bfb89825..edd46ac1c 100644
--- a/Completion/Unix/Command/_find
+++ b/Completion/Unix/Command/_find
@@ -139,7 +139,7 @@ _arguments -C $args \
'*-nogroup' \
'*-nouser' \
'*-ok:program: _command_names -e:*\;::program arguments: _normal' \
- '*-perm: :_modes' \
+ '*-perm: :_file_modes' \
'*-print' \
'*-prune' \
'*-size:file size (blocks)' \
diff --git a/Completion/Unix/Command/_mkdir b/Completion/Unix/Command/_mkdir
index 830a96162..53536b01d 100644
--- a/Completion/Unix/Command/_mkdir
+++ b/Completion/Unix/Command/_mkdir
@@ -4,7 +4,7 @@ local curcontext="$curcontext" state line expl args variant ret=1
typeset -A opt_args
args=(
- '(-m --mode)'{-m,--mode=}'[set permission mode]: :_modes'
+ '(-m --mode)'{-m,--mode=}'[set permission mode]: :_file_modes'
'(-p --parents)'{-p,--parents}'[make parent directories as needed]'
'(-)*: :->directories'
)
diff --git a/Completion/Unix/Type/_modes b/Completion/Unix/Type/_file_modes
similarity index 100%
rename from Completion/Unix/Type/_modes
rename to Completion/Unix/Type/_file_modes
Messages sorted by:
Reverse Date,
Date,
Thread,
Author