From: Vishal Verma <vishal.l.verma@intel.com>
To: linux-nvdimm@lists.01.org
Subject: [ndctl PATCH 4/4] ndctl, bash-completion: Add bash completion for inject-smart
Date: Thu, 8 Feb 2018 14:04:28 -0700 [thread overview]
Message-ID: <20180208210428.7285-4-vishal.l.verma@intel.com> (raw)
In-Reply-To: <20180208210428.7285-1-vishal.l.verma@intel.com>
This adds bash completion for the enw ndctl inject-smart command.
non-option arguments are completed with dimms, and new options
requiring data are marked as such.
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
contrib/ndctl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/contrib/ndctl b/contrib/ndctl
index eeda1c4..9a14383 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|--firmware) ]]; then
+ if [[ "$cword" == @(--bus|--region|--type|--mode|--size|--dimm|--reconfig|--uuid|--name|--sector-size|--map|--namespace|--input|--output|--label-version|--align|--block|--count|--firmware|--alarm-control|--media-temperature|--ctrl-temperature|--spares) ]]; then
COMPREPLY[$i]="${cword}="
else
COMPREPLY[$i]="${cword} "
@@ -262,6 +262,9 @@ __ndctl_comp_non_option_args()
inject-error)
opts="$(__ndctl_get_ns -i)"
;;
+ inject-smart)
+ opts="$(__ndctl_get_dimms -i)"
+ ;;
*)
return
;;
--
2.14.3
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
prev parent reply other threads:[~2018-02-08 20:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 21:04 [ndctl PATCH 1/4] ndctl, inject-error: error out for a non-existent namespace Vishal Verma
2018-02-08 21:04 ` [ndctl PATCH 2/4] ndctl: add ndctl_encode_smart_temperature() Vishal Verma
2018-02-08 21:04 ` [ndctl PATCH 3/4] ndctl: add a new command - inject-smart Vishal Verma
2018-02-09 0:13 ` Dan Williams
2018-02-08 21:04 ` Vishal Verma [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180208210428.7285-4-vishal.l.verma@intel.com \
--to=vishal.l.verma@intel.com \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).