[Bash-completion-devel] Bug#768005: Bug#768005: Please support xl xen management command

Peter Cordes peter at cordes.ca
Thu Jun 4 19:19:21 UTC 2015


On Mon, Jun 01, 2015 at 09:10:33PM -0400, Gabriel Filion wrote:
> This would've been great to have for the jessie release.
> 
> The lack of completion for xl makes using this command quite annoying.
> 
> 
> Since most of the commands are the same as with xm, we could start with
> cloning the completion file for xm and work out the differences from there.

 If they can actually share some common functions, you can put
both handlers in the same file, and symlink one to the other.

 Or use _xfunc() to call a function from the other file (which checks
if the function you want to call is already defined, else source and
then call.)

 Or maybe put something at the global level of completions/xl, so when
that file is loaded, it makes sure completions/xm is loaded, by
checking for something that xm defines.  Then the function definitions
that stick around in RAM after things are loaded are smaller and
simpler (no _xfunc, just direct calls).

 I don't use xen, so I have no plans to write completions for xen
commands myself, but patches usually get looked at eventually when
sent in to the bash-completion mailing list.  (It receives mail from
debian bugs on the bash-completion package.)

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter at cor , des.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BC



More information about the Bash-completion-devel mailing list