ndctl: bash completion for {enable, disable}-dimm commands
Vishal Verma
maintainerPATCH 1/1 ndctl: bash completion for {enable, disable}-dimm commands
Add bash completion for the two new commands. Don't add a "-i" by default in __ndctl_get_dimms, instead specift "-i" manually where needed (everywhere except the completion for disable-dimm)
Signed-off-by Vishal Verma <[email protected]>
--- contrib/ndctl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
contrib/ndctl +9 -4
@@ -127,8 +127,7 @@ __ndctl_get_ns() __ndctl_get_dimms() { - # when listing dimms, always list idle ones too - opts="--dimms -i $*" + opts="--dimms $*" [ -n "$bus_filter" ] && opts="$opts --bus=$bus_filter" echo "$(ndctl list $opts | grep -E "^\s*\"dev\":" | cut -d\" -f4)" }
@@ -148,7 +147,7 @@ __ndctl_comp_options() opts=$(__ndctl_get_regions) ;; --dimm) - opts=$(__ndctl_get_dimms) + opts=$(__ndctl_get_dimms -i) ;; --namespace) opts=$(__ndctl_get_ns)
@@ -201,10 +200,16 @@ __ndctl_comp_non_option_args() disable-region) opts="$(__ndctl_get_regions) all" ;; + enable-dimm) + opts="$(__ndctl_get_dimms -i) all" + ;; + disable-dimm) + opts="$(__ndctl_get_dimms) all" + ;; read-labels) ;& zero-labels) - opts="$(__ndctl_get_dimms) all" + opts="$(__ndctl_get_dimms -i) all" ;; *) return
Signature · 6 lines
2.7.4 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Vishal Verma
maintainerRe: [ndctl PATCH] ndctl: bash completion for {enable,disable}-dimm commands
Quoted 2 lines · Vishal Verma
Add bash completion for the two new commands. Don't add a "-i" by default in
__ndctl_get_dimms, instead specift "-i" manually where needed
s/specifit/specify/
Quoted 7 lines
(everywhere except the completion for disable-dimm)
Signed-off-by Vishal Verma <[email protected]>--- contrib/ndctl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm