Add filename completion for --firmware. dimm completion is already in
place from other commands that use dimms.
Cc: Dave Jiang <dave.jiang(a)intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma(a)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