Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _mysqldiff
- X-seq: zsh-workers 16779
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: PATCH: _mysqldiff
- Date: Thu, 7 Mar 2002 13:55:56 +0000
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
- Sender: "Adam Spiers,,07775562717,020 88 30 30 35" <adam@xxxxxxxxxxxxxxxxxxxx>
This adds completion for my mysqldiff utility (see
<http://adamspiers.org/computing/mysqldiff/>).
Index: Completion/Unix/Command/.distfiles
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/.distfiles,v
retrieving revision 1.20
diff -u -r1.20 .distfiles
--- Completion/Unix/Command/.distfiles 7 Mar 2002 13:36:38 -0000 1.20
+++ Completion/Unix/Command/.distfiles 7 Mar 2002 13:54:47 -0000
@@ -16,5 +16,5 @@
_diff _gs _make _psutils _tin _apm _mail
_last _loadkeys _modutils _ruby _sysctl _links _samba
_user_admin _rsync _arping _spamassassin _mtools _ifconfig
-_fsh _chkconfig _cdcd _irssi
+_fsh _chkconfig _cdcd _irssi _mysqldiff
'
Index: Completion/Unix/Command/_mysqldiff
===================================================================
RCS file: Completion/Unix/Command/_mysqldiff
diff -N Completion/Unix/Command/_mysqldiff
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_mysqldiff 7 Mar 2002 13:54:47 -0000
@@ -0,0 +1,31 @@
+#compdef mysqldiff
+
+local curcontext="$curcontext" state line expl
+typeset -A opt_args
+
+_mysqldiff () {
+ _arguments -s \
+ {-h{,1,2},--host{,1,2}=}':server hostname:_mysql_hosts' \
+ {-p{,1,2},--password{,1,2}=}':server password: ' \
+ {-u{,1,2},--user{,1,2}=}':server username:_mysql_users' \
+ {-s{,1,2},--socket{,1,2}=}':server socket:_directories' \
+ {-d,--debug=}':debugging level (default 1):(1 2 3 4 5 6 7 8)' \
+ {-i,--tolerant}':ignore DEFAULT and formatting changes: ' \
+ {-k,--keep-old-tables}":don\'t output DROP TABLE commands: " \
+ {-n,--no-old-defs}"[don't output old defs as comments]" \
+ {-o,--only-both}'[only output changes for tables in both databases]' \
+ {-t,--table-re}':restrict comparisons to tables matching a regexp: ' \
+ {-A,--apply}':interactively patch database1 to match database2: ' \
+ {-\?,--help}'[display usage]' \
+ {1,2}':MySQL database:_mysql_db_or_file'
+}
+
+
+_mysql_db_or_file () {
+ _alternative \
+ 'databases:MySQL databases:_mysql_databases' \
+ 'files:MySQL database definition files:_files -g \*.\(my\|\)sql'
+}
+
+_mysql_utils
+_mysqldiff "$@"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author