Re: [Bash-completion-devel] [PATCH 0/3] Fix lvm completion

2016-03-07 Thread Liuhua Wang
Hi Ville, I fixed as you suggested and pulled a request to Github: https://github.com/scop/bash-completion/pull/13 Very appriciated if you can review and give comments. Thank you very much. Best regards, Liuhua On Mon, Mar 07, 2016 at 04:10:57PM +0200, Ville Skyttä wrote: > On Mon, Mar 7, 2016

Re: [Bash-completion-devel] [PATCH 0/3] Fix lvm completion

2016-03-07 Thread Liuhua Wang
On Mon, Mar 07, 2016 at 04:10:57PM +0200, Ville Skyttä wrote: > On Mon, Mar 7, 2016 at 11:56 AM, Liuhua Wang wrote: > > Liuhua Wang (3): > > lvm: fix all commands that should get all PVs > > lvm: pvcreate should be able to use all block devcices > > lvm: disable silent temporarily to avoid n

Re: [Bash-completion-devel] [PATCH 0/3] Fix lvm completion

2016-03-07 Thread Ville Skyttä
On Mon, Mar 7, 2016 at 11:56 AM, Liuhua Wang wrote: > Liuhua Wang (3): > lvm: fix all commands that should get all PVs > lvm: pvcreate should be able to use all block devcices > lvm: disable silent temporarily to avoid no output Looks like these changes no longer apply to the current master

[Bash-completion-devel] [PATCH 2/3] lvm: pvcreate should be able to use all block devcices

2016-03-07 Thread Liuhua Wang
Add _lvm_filedir() to use _filedir except set $cur to /dev when $cur is empty. Signed-off-by: Liuhua Wang Reviewed-by: Lidong Zhong --- completions/lvm | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/completions/lvm b/completions/lvm index 1535c5c..e213967 100644 ---

[Bash-completion-devel] [PATCH 0/3] Fix lvm completion

2016-03-07 Thread Liuhua Wang
Liuhua Wang (3): lvm: fix all commands that should get all PVs lvm: pvcreate should be able to use all block devcices lvm: disable silent temporarily to avoid no output completions/lvm | 54 +++--- 1 file changed, 47 insertions(+), 7 deletions

[Bash-completion-devel] [PATCH 3/3] lvm: disable silent temporarily to avoid no output

2016-03-07 Thread Liuhua Wang
bash-completion will not work when /etc/lvm/lvm.conf silent is 1 because there is no output for vg/lv/pvscan. So we check the value of silent option. If it is 1 then temporarily set silent 0 and recover back to 1 after the command executed. Signed-off-by: Liuhua Wang Reviewed-by: Lidong Zhong -

[Bash-completion-devel] [PATCH 1/3] lvm: fix all commands that should get all PVs

2016-03-07 Thread Liuhua Wang
_lvm_physicalvolumes() only gets PVs that belong to a VG. In some cases like pvremove we can use all PVs including those not included in any VGs. So we add a new function _lvm_physicalvolumes_all() to get all PVs, and fix all the commands that need to use _lvm_physicalvolumes_all() instead of _lvm