[Bash-completion-devel] [PATCH] New improved cryptsetup completion

Matthew Hall mhall at mhcomputing.net
Wed Feb 5 16:58:10 UTC 2014


You could call some known utility from the package during init and use that to determine the version on the system, with which the completions should be compatible. Or you could query the dpkg DB for the version, or something such...
-- 
Sent from my mobile device.

On February 5, 2014 7:09:15 AM PST, Bruno Ricci <bruno.ricci at epfl.ch> wrote:
>I have been working on the cryptsetup completion. The one currently in
>the tree is missing some option (ex tcryptOpen, tcryptDump, etc), has
>some obsolete options (for example luksDelKey is now obselete as of
>cryptsetup 1.6.2). Moreover the current completion is in general not
>clever enough. For example --use-random and --use-urandom are mutually
>exclusive and so if --use-random is on the command line, --use-urandom
>should not be suggested. As a downside, the completion is now approx
>40k
>in size.
>
>Features of the new completion.
>	-- all command in the man page (except create)
> 	(as of cryptsetup 1.6.2) are now completed with
>	the appropriate options. Ex. luksKillSlot <tab> <tab>
>	 does only show the options and parameter
>	which are valid with this command.
>	-- mutually exclusive command are implemented
>	Ex. --use-urandom | --use-random, --hash | --cipher
>	for the benchmark command
>	-- the majority of options only make sense specified once
>	(exception are --key-file with tcrypt* and some few other)
>	so options already specified on the command line are not
>	suggested again (except for the few exceptions).
>	-- the file is now documented
>	-- I believe it complies with the style guideline
>	(in particular the 79 char limit and the "tab-are-4-space")
>
>The patch and the whole file are attached. What do you think about it ?
>In particular how do we deal with users who have
>an older version of cryptsetup which might not have all the commands
>in this completion (in particular tcrypt* which was introduced in
>1.6.0)
>Comments, suggestions and criticism are welcome.
>
>Bruno Ricci
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Bash-completion-devel mailing list
>Bash-completion-devel at lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20140205/b15807c4/attachment.html>


More information about the Bash-completion-devel mailing list