Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1661329

Summary: RFE: Provide bash completion for vdostats command
Product: Red Hat Enterprise Linux 7 Reporter: John Wiele <jwiele>
Component: vdoAssignee: John Wiele <jwiele>
Status: CLOSED WONTFIX QA Contact: Jakub Krysl <jkrysl>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.7CC: awalsh, bgurney, corwin, jkrysl, jwiele, pasik, rhandlin
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1666425 (view as bug list) Environment:
Last Closed: 2019-07-02 19:11:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1666425    

Description John Wiele 2018-12-20 20:25:02 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. type vdostats<tab><tab>

Actual results:
nothing

Expected results:
a list printed of all possible options of the vdostats command

Additional info:
patch provided by Achilles Gaikwad <agaikwad>
---
 vdo-manager/Makefile      |  2 ++
 vdo-manager/vdostats.bash | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100755 vdo-manager/vdostats.bash

diff --git a/vdo-manager/Makefile b/vdo-manager/Makefile
index d998e76..fb07381 100644
--- a/vdo-manager/Makefile
+++ b/vdo-manager/Makefile
@@ -27,6 +27,7 @@ INSTALL = install
 INSTALLOWNER ?= -o root -g root
 bindir ?= /usr/bin
 INSTALLDIR=$(DESTDIR)$(bindir)
+BASHDIR = /etc/bash_completion.d/

 python3_sitelib ?= \
         $(shell python3 -c "import site; print(site.getsitepackages()[0])")
@@ -40,6 +41,7 @@ all clean:
        done

 install:
+       $(INSTALL) $(INSTALLOWNER) -m 644 vdostats.bash $(BASHDIR);
        $(INSTALL) $(INSTALLOWNER) -d $(INSTALLDIR)
        set -e;                                                         \
        for p in $(PROGS); do                                           \
diff --git a/vdo-manager/vdostats.bash b/vdo-manager/vdostats.bash
new file mode 100755
index 0000000..9ec0bd6
--- /dev/null
+++ b/vdo-manager/vdostats.bash
@@ -0,0 +1,18 @@
+#!bash
+# bash completion for vdostats
+# TODO :  Add device name at the end of completion of the commands.
+
+_vdostats()
+{
+    local opts cur
+    COMPREPLY=()
+    opts="--help --all --human-readable --si --verbose --version"
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    case "${cur}" in
+        *)
+               COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+            ;;
+    esac
+}
+
+complete -F _vdostats vdostats
--

Comment 8 John Wiele 2020-01-30 19:38:55 UTC
Fixed in RHEL8.1 and later. Will not be fixed in RHEL7.