zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _mondo completion
@ 2002-05-06  6:33 Borsenkow Andrej
  0 siblings, 0 replies; only message in thread
From: Borsenkow Andrej @ 2002-05-06  6:33 UTC (permalink / raw)
  To: 'Zsh hackers list'

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

This adds completion for mondoarchive. It is put in _mondo in some
expectation that more may follow (like mindi e.g.). It is also put in Linux
because it is pure Linux command but is not restricted to any particular
distro.

If it is O.K. to add Linux subdir I'll commit it.

-andrej


[-- Attachment #2: zsh-mondo.diff --]
[-- Type: application/octet-stream, Size: 3615 bytes --]

Index: Completion/Linux/Command/.distfiles
===================================================================
RCS file: Completion/Linux/Command/.distfiles
diff -N Completion/Linux/Command/.distfiles
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Linux/Command/.distfiles	6 May 2002 06:22:18 -0000
@@ -0,0 +1,4 @@
+DISTFILES_SRC='
+.distfiles
+_mondo
+'
Index: Completion/Linux/Command/_mondo
===================================================================
RCS file: Completion/Linux/Command/_mondo
diff -N Completion/Linux/Command/_mondo
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Linux/Command/_mondo	6 May 2002 06:22:18 -0000
@@ -0,0 +1,53 @@
+#compdef mondoarchive
+
+local context state line expl ret=1
+typeset -A opt_args
+
+_arguments \
+  "(-V)-O[create backup]" \
+  "(-O)-V[verify backup]" \
+  "(-c -C -i -n -w)-c[use CD-R as backup media]:CD-R burn speed: " \
+  "(-c -C -i -n -w)-C[use CD-R as streaming device (experimental)]:CD-R burn speed: " \
+  "(-c -C -i -n -w)-i[use ISO image as backup media]" \
+  "(-c -C -i -n -w)-n[use NFS mountpoint as backup media]:NFS mountpoint: " \
+  "(-c -C -i -n -w)-w[use CD-RW as backup media]:CD-RW burn speed: " \
+  "-D[differential backup]" \
+  "-E[exclude path(s) from backup]:paths to exclude from backup:->quoted_path" \
+  "-I[path(s) to backup]:paths to inlcude in backup:->quoted_path" \
+  "-d[backup device]:backup device: " \
+  "-g[run in fullscreen mode]" \
+  "-k[path to kernel]:path to kernel:->kernel_or_magic" \
+  "-m[manual eject]" \
+  "-s[media size]:media size]: " \
+  "-x[non-linux partition]:non-linux partition:_files -g '*(%b)'" \
+  "(-1 -2 -3 -4 -5 -6 -7 -8 -9)-"{1,2,3,4,5,6,7,8,9}"[compression level]" \
+  "-A[post ISO-creation command]:pre ISO-creation command: " \
+  "-B[pre iSO-creation command]:post ISO-creation command: " \
+  "-F[do not create floppy]" \
+  "-H[create autorestore image]" \
+  "-L[use lzo instead of bzip2]" \
+  "-P[post-nuke tarball]:post-nuke tarball:_files -g '*.(#i)(tar.gz|tgz)'" \
+  "-S[scratch directory]:scratch directory:_files -/" \
+  "-T[temporary directory]:temporary directory:_files -/" \
+  "-f[device with MBR]:device with MBR:_files -g '*(%b)'" \
+  "-l[bootloader type]:bootloader type:(GRUB LILO)" \
+  && ret=0
+
+case $state in
+  quoted_path )
+    local suf="/ \t\n"
+    [[ -n $compstate[quote] ]] && { suf="$compstate[quote]$suf"; compset -q; }
+    _files -r $suf && ret=0
+  ;;
+  kernel_or_magic )
+    _tags kernel magic
+    while _tags; do
+      _requested magic expl "keywords" \
+	compadd -- FAILSAFE && ret=0
+      _requested kernel expl "path to kernel image" \
+	_files  && ret=0
+    done
+  ;;
+esac
+
+return $ret
Index: Src/Zle/complete.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complete.mdd,v
retrieving revision 1.7
diff -u -r1.7 complete.mdd
--- Src/Zle/complete.mdd	15 Nov 2001 12:35:47 -0000	1.7
+++ Src/Zle/complete.mdd	6 May 2002 06:22:18 -0000
@@ -1,7 +1,7 @@
 name=zsh/complete
 link=either
 load=yes
-functions='Completion/comp* Completion/AIX/*/* Completion/BSD/*/* Completion/Base/*/* Completion/Debian/*/* Completion/Mandrake/*/* Completion/Redhat/*/* Completion/Unix/*/* Completion/X/*/* Completion/Zsh/*/*'
+functions='Completion/comp* Completion/AIX/*/* Completion/BSD/*/* Completion/Base/*/* Completion/Debian/*/* Completion/Linux/*/* Completion/Mandrake/*/* Completion/Redhat/*/* Completion/Unix/*/* Completion/X/*/* Completion/Zsh/*/*'
 
 moddeps="zsh/zle"
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-06  6:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-06  6:33 PATCH: _mondo completion Borsenkow Andrej

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).