Message ID | 20180202225258.30382-1-vishal.l.verma@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 7f0b6fc71999 |
Headers | show |
On 02/02/2018 03:52 PM, Vishal Verma wrote: > Add filename completion for --firmware. dimm completion is already in > place from other commands that use dimms. > > Cc: Dave Jiang <dave.jiang@intel.com> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Thanks! Reviewed-by: Dave Jiang <dave.jiang@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 > ;; >
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 ;;
Add filename completion for --firmware. dimm completion is already in place from other commands that use dimms. Cc: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- contrib/ndctl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)