about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2005-07-11 03:34:15 +0000
committerBart Schaefer <barts@users.sourceforge.net>2005-07-11 03:34:15 +0000
commit80e8e43f76fe7afc5e447c1289fcdc0408c351e8 (patch)
tree224b79106319f9fc635f01758c246a2c39ef7160
parent6f518486a24e75e89f342b4a37e43d9e3c15f660 (diff)
downloadzsh-80e8e43f76fe7afc5e447c1289fcdc0408c351e8.tar.gz
zsh-80e8e43f76fe7afc5e447c1289fcdc0408c351e8.tar.xz
zsh-80e8e43f76fe7afc5e447c1289fcdc0408c351e8.zip
21423: Travis: completion for unexpand
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_unexpand42
2 files changed, 45 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b5db33db7..e9fb546ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-07-10  Bart Schaefer  <schaefer@zsh.org>
 
+	* 21423: Travis Spencer: Completion/Unix/Command/_unexpand:
+	completion for both GNU and Sun/BSD unexpand variants.
+
 	* unposted: Functions/Misc/allopt: use "set -o" to avoid twaddling
 	the setting of kshoptionprint.
 
diff --git a/Completion/Unix/Command/_unexpand b/Completion/Unix/Command/_unexpand
new file mode 100644
index 000000000..c553647fc
--- /dev/null
+++ b/Completion/Unix/Command/_unexpand
@@ -0,0 +1,42 @@
+#compdef unexpand
+#
+# $Id: _unexpand,v 1.1 2005/07/11 03:34:35 barts Exp $
+#
+# Copyright (C) 2005 Travis L. Spencer
+# ALL RIGHTS RESERVED
+#
+# See the file LICENCE in the root of the zsh distribution for
+# licensing information.
+#
+
+local all tabs ret=1
+local -a args
+
+all="convert all whitespace, instead of just initial whitespace"
+tabs="use comma separated list of tab positions"
+args=( 
+    "(--all)-a[$all]"
+    "(--tabs)-t[$tabs]:tablist"
+    "*:file:_files"
+)
+
+if _pick_variant gnu="Free Soft" unix --version; then
+    args+=(
+        "(-a)--all[$all]"
+        "--first-only[convert only leading sequences of whitespace]"
+        "(-t)--tabs=[$tabs]:tablist"
+        "(* -)--help[display help message and exit]"
+        "(* -)--version[output version information and exit]"
+    )
+fi
+
+_arguments "$args[@]" && ret=0
+
+return ret
+
+: <<EMACS_LOCAL_VARIABLES
+Local Variables:
+mode: shell-script
+mode: flyspell-prog
+End:
+EMACS_LOCAL_VARIABLES