Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Completion batch #1: Add some g-prefixed GNU variants



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