#471266 bash-completion: lvm completion does not work properly

#471266#5
Date:
2008-03-17 00:02:33 UTC
From:
To:
Command line completion (in /etc/bash_completion) for the lvm2 suite of
tools does not work very well and it would be better to remove it
altogether.

Examples of broken behaviour:
# lvextend --size <tab>

This only allows completion on the words in the list "g  G  k  K  m  M
t  T". However a number must also be entered before the the units and
then the units cannot be completed. This is of such marginal utility
that is should be removed (IMHO).

# lvextend --size +40G <tab>

The completes on the physical volumes, not the logical volumes as it
should. This is because it counts "+40G" as the logical volume (the
first non-option argument) and assumes that a physical volume path is
now needed.

I think there are a number of other situations when the completion
fails. I always seem to have to type a path to the logical volume
without tab completion available. It would be better if it did not try
any specific completion at all.

#471266#14
Date:
2011-08-10 11:55:02 UTC
From:
To:
retitle 471266 bash-completion: lvm completion does not work properly
kthxbye

This bug is very annoying and drove a coworker of mine nearly mad.

My workaround (propagated to about 200 Debian and Ubuntu workstations
and servers):

  dpkg-divert --divert /etc/bash_completion.d/.lvm.disabled --local --rename --add /etc/bash_completion.d/lvm

Accordingly I suggest to remove the LVM completion completely from the
package unless this issue is fixed. IMHO LVM completion in its current
state does more harm than it helps.

		Regards, Axel