Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Completion batch #1: Add some g-prefixed GNU variants
- X-seq: zsh-workers 42207
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Completion batch #1: Add some g-prefixed GNU variants
- Date: Wed, 3 Jan 2018 06:24:24 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=rJbj4TzStkYlWV2rDR/MaZk1cTuLAkdIHjIy1KwJamk=; b=vKgNnp/iMwaNa9h2IS/Ns/y2mKvJ6k9uEAS9k2V7uRocTNmSViK5K5/3cFHzkRaNa6 gc5zoja/yzTck7vAc0mDp2L21C+Rr2f4Jya90nY/R0tBk9onf9YhaEl5XSsOQ0k4uri+ f/H52+iWVyus6zXbAOKUsLYkCEj3bHf3UP72Ec2KXpvF18SH00MSwZOHdmZsj06OaGyc 7KjtpjInLZKkgfA/lL8jRJFgjomEqnW2ZuFDDqnNzRhnk4rX8VD68s/SXnaXjDrm3pG+ 0GqccMwbFtoN5HulUai8b5SfSrUffxzju5UVgQjIt76HP7OHGY2Vz6QoQ8wryoYKx5um wxhg==
- 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
I mentioned the other day that i was sitting on a bunch of completion changes.
Most of them are new functions, but some are improvements to existing ones. I
think i'll submit them in batches so the review work isn't too overwhelming. Let
me know if there's any way i can make it easier though.
Batch 1 is easy: I just updated several functions to include the g-prefixed
command names used for GNU variants on systems like macOS+Homebrew.
dana
diff --git a/Completion/Unix/Command/_cat b/Completion/Unix/Command/_cat
index 46180f2c8..e383f8c6b 100644
--- a/Completion/Unix/Command/_cat
+++ b/Completion/Unix/Command/_cat
@@ -1,4 +1,4 @@
-#compdef cat
+#compdef cat gcat
local -a args
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown
index 5750c65ab..c3abb5858 100644
--- a/Completion/Unix/Command/_chown
+++ b/Completion/Unix/Command/_chown
@@ -1,4 +1,4 @@
-#compdef chown chgrp zf_chown=chown zf_chgrp=chgrp
+#compdef chown chgrp gchown=chown gchgrp=chgrp zf_chown=chown zf_chgrp=chgrp
local curcontext="$curcontext" state line expl ret=1
local suf usr grp req deref pattern arg args
diff --git a/Completion/Unix/Command/_cut b/Completion/Unix/Command/_cut
index caf8f32b7..d3b1e2b10 100644
--- a/Completion/Unix/Command/_cut
+++ b/Completion/Unix/Command/_cut
@@ -1,4 +1,4 @@
-#compdef cut
+#compdef cut gcut
typeset -A _cut_args
diff --git a/Completion/Unix/Command/_dd b/Completion/Unix/Command/_dd
index 1a2ae871a..e51337f21 100644
--- a/Completion/Unix/Command/_dd
+++ b/Completion/Unix/Command/_dd
@@ -1,4 +1,4 @@
-#compdef dd
+#compdef dd gdd
_values -w 'option' \
'if[specify input file]:input file:_tilde_files' \
diff --git a/Completion/Unix/Command/_df b/Completion/Unix/Command/_df
index d20ddea7e..4567b64b0 100644
--- a/Completion/Unix/Command/_df
+++ b/Completion/Unix/Command/_df
@@ -1,4 +1,4 @@
-#compdef df
+#compdef df gdf
local curcontext="$curcontext" state state_descr line args spec ret=1
local -A opt_args
diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env
index 214c61e54..96e96bd7b 100644
--- a/Completion/Unix/Command/_env
+++ b/Completion/Unix/Command/_env
@@ -1,4 +1,4 @@
-#compdef env
+#compdef env genv
local context state line variant args ret=1
diff --git a/Completion/Unix/Command/_fmt b/Completion/Unix/Command/_fmt
index 759396637..87c7005b9 100644
--- a/Completion/Unix/Command/_fmt
+++ b/Completion/Unix/Command/_fmt
@@ -1,4 +1,4 @@
-#compdef fmt
+#compdef fmt gfmt
local variant
local -a args
diff --git a/Completion/Unix/Command/_head b/Completion/Unix/Command/_head
index 75fc1f0a1..1e968cc11 100644
--- a/Completion/Unix/Command/_head
+++ b/Completion/Unix/Command/_head
@@ -1,4 +1,4 @@
-#compdef head
+#compdef head ghead
local curcontext=$curcontext state state_descr line expl opts args ret=1
typeset -A opt_args
diff --git a/Completion/Unix/Command/_paste b/Completion/Unix/Command/_paste
index 6efe8eacb..d9598bfef 100644
--- a/Completion/Unix/Command/_paste
+++ b/Completion/Unix/Command/_paste
@@ -1,4 +1,4 @@
-#compdef paste
+#compdef paste gpaste
local -a args
local dopt='[specify delimiter list]:delimiter list [tab]'
diff --git a/Completion/Unix/Command/_printenv b/Completion/Unix/Command/_printenv
index ad5b49815..8bff27c90 100644
--- a/Completion/Unix/Command/_printenv
+++ b/Completion/Unix/Command/_printenv
@@ -1,4 +1,4 @@
-#compdef printenv
+#compdef printenv gprintenv
local expl
diff --git a/Completion/Unix/Command/_stdbuf b/Completion/Unix/Command/_stdbuf
index 3bce3d0a7..e45b5a5cd 100644
--- a/Completion/Unix/Command/_stdbuf
+++ b/Completion/Unix/Command/_stdbuf
@@ -1,4 +1,4 @@
-#compdef stdbuf
+#compdef stdbuf gstdbuf
local -a short long buf args
local i opt gnu=0
diff --git a/Completion/Unix/Command/_stty b/Completion/Unix/Command/_stty
index b5545ebcd..73347c5b7 100644
--- a/Completion/Unix/Command/_stty
+++ b/Completion/Unix/Command/_stty
@@ -1,4 +1,4 @@
-#compdef stty
+#compdef stty gstty
local expl
diff --git a/Completion/Unix/Command/_tail b/Completion/Unix/Command/_tail
index 4e6422621..b7001389b 100644
--- a/Completion/Unix/Command/_tail
+++ b/Completion/Unix/Command/_tail
@@ -1,4 +1,4 @@
-#compdef tail
+#compdef tail gtail
local curcontext=$curcontext state state_descr line opts args ret=1
typeset -A opt_args
diff --git a/Completion/Unix/Command/_tr b/Completion/Unix/Command/_tr
index efa3d4c91..d244bf875 100644
--- a/Completion/Unix/Command/_tr
+++ b/Completion/Unix/Command/_tr
@@ -1,4 +1,4 @@
-#compdef tr
+#compdef tr gtr
local curcontext="$curcontext" state line expl ret=1
local args variant k
diff --git a/Completion/Unix/Command/_uname b/Completion/Unix/Command/_uname
index 414a82a87..31af91eb7 100644
--- a/Completion/Unix/Command/_uname
+++ b/Completion/Unix/Command/_uname
@@ -1,4 +1,4 @@
-#compdef uname
+#compdef uname guname
typeset -A _uname_args
local -a args
diff --git a/Completion/Unix/Type/_directories b/Completion/Unix/Type/_directories
index 2125645fe..456af3b6c 100644
--- a/Completion/Unix/Type/_directories
+++ b/Completion/Unix/Type/_directories
@@ -1,4 +1,4 @@
-#compdef rmdir zf_rmdir dircmp -P -value-,*path,-default-
+#compdef rmdir grmdir zf_rmdir dircmp -P -value-,*path,-default-
local expl
Messages sorted by:
Reverse Date,
Date,
Thread,
Author