zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: new _losetup
@ 2002-08-28 17:20 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2002-08-28 17:20 UTC (permalink / raw)
  To: Zsh workers

new completion for losetup.

Does anyone mind if I move _valgrind and _modutils to
Completion/Linux/Command?

On the subject of _modutils, shouldn't there be some sort of '*:...'
_arguments spec in it so that it covers the normal case when you just
load a module.

Oliver

Index: Completion/Linux/Command/_losetup
===================================================================
RCS file: Completion/Linux/Command/_losetup
diff -N Completion/Linux/Command/_losetup
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Linux/Command/_losetup	28 Aug 2002 16:54:24 -0000
@@ -0,0 +1,14 @@
+#compdef losetup
+
+local cyphers
+cyphers=( /proc/crypto/cipher/*(N:t) )
+cyphers="${cyphers[@]%-*}"
+
+_arguments -S \
+  '(- 2)'{--delete,--detach,-d}'[detach from specified loop device]' \
+  '(-d --delete --detach -e --encryption)'{-e,--encryption}"+[enable encryption]:cypher:( $cyphers )" \
+  '(-d --delete --detach -o --offset)'{-o,--offset}'+[specify data start is offset]:offset (bytes)' \
+  '(-d --delete --detach -p --pass-fd)'{-p,--pass-fd}'+[read passphrase from specified file descriptor]:file descriptor:_file_descriptors' \
+  '(-d --delete --detach -k --keybits)'{-k,--keybits}'+[set the number of bits to use in key]:key size:(64 128 160 192 256)' \
+  '1:device:_files -g loop\*' \
+  '(-d --delete --detach)2:file:_files'

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


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

only message in thread, other threads:[~2002-08-28 17:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-28 17:20 PATCH: new _losetup Oliver Kiddle

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).