Skip to contentSkip to conversation

ndctl, bash completion: add completion for update-firmware

PATCH In review Vishal Verma 2 participants 2 messages Feb 2, 2018 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Vishal Verma

author maintainer
#0 lore raw

PATCH 1/1 ndctl, bash completion: add completion for update-firmware

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

---
 contrib/ndctl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
contrib/ndctl +3 -1
index fb0d421..eeda1c4 100755
@@ -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
 			;;
Signature · 6 lines
2.14.3

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Vishal Verma

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

Thanks!

Quoted 19 lines
---
 contrib/ndctl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
contrib/ndctl +1 -1
index fb0d421..eeda1c4 100755
@@ -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} "

contrib/ndctl __ndctl_comp_options() · line 209

Quoted 8 lines
contrib/ndctl +2 -0
@@ -202,6 +202,8 @@ __ndctl_comp_options()
 		--output)
 			;&
 		--input)
+			;&
+		--firmware)
 			__ndctl_file_comp "${cur##*=}"
 			return
 			;;

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm