Add filename completion for --firmware. dimm completion is already in
place from other commands that use dimms.

Cc: Dave Jiang <dave.ji...@intel.com>
Signed-off-by: Vishal Verma <vishal.l.ve...@intel.com>
---
 contrib/ndctl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/ndctl b/contrib/ndctl
index fb0d421..eeda1c4 100755
--- a/contrib/ndctl
+++ b/contrib/ndctl
@@ -91,7 +91,7 @@ __ndctlcomp()
 
        COMPREPLY=( $( compgen -W "$1" -- "$2" ) )
        for cword in "${COMPREPLY[@]}"; do
-               if [[ "$cword" == 
@(--bus|--region|--type|--mode|--size|--dimm|--reconfig|--uuid|--name|--sector-size|--map|--namespace|--input|--output|--label-version|--align|--block|--count)
 ]]; then
+               if [[ "$cword" == 
@(--bus|--region|--type|--mode|--size|--dimm|--reconfig|--uuid|--name|--sector-size|--map|--namespace|--input|--output|--label-version|--align|--block|--count|--firmware)
 ]]; then
                        COMPREPLY[$i]="${cword}="
                else
                        COMPREPLY[$i]="${cword} "
@@ -202,6 +202,8 @@ __ndctl_comp_options()
                --output)
                        ;&
                --input)
+                       ;&
+               --firmware)
                        __ndctl_file_comp "${cur##*=}"
                        return
                        ;;
-- 
2.14.3

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to