]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Add bash completion to list backing store types for lxc-create -B
authorAbbas Ally <abbasally5@yahoo.com>
Sun, 3 Dec 2017 05:51:44 +0000 (05:51 +0000)
committerAbbas Ally <abbasally5@yahoo.com>
Sun, 3 Dec 2017 05:51:44 +0000 (05:51 +0000)
- Backing Store types are hard-coded (Not sure how to get programmatically)
- Closes #1236

Signed-off-by: Abbas Ally <abbasally5@yahoo.com>
config/bash/lxc.in

index 7dcf3022b2675d19d0b34a2ee7e1b9358e3ec1e7..72d5f08172eb7b52b6098ac849a822cb7557cb68 100644 (file)
@@ -11,6 +11,10 @@ _have lxc-start && {
         COMPREPLY=( $( compgen -W "$(ls @LXCTEMPLATEDIR@/ | sed -e 's|^lxc-||' )" "$cur" ) )
     }
 
+    _lxc_backing_stores() {
+        COMPREPLY=( $( compgen -W "dir lvm loop btrfs zfs rbd best" "$cur" ) )
+    }
+
     _lxc_generic_n() {
         local cur prev
 
@@ -59,6 +63,11 @@ _have lxc-start && {
                 _lxc_templates "$cur"
                 return 0
             ;;
+
+            -B)
+                _lxc_backing_stores "$cur"
+                return 0
+            ;;
         esac
 
         return 1