From b261e4fb6f0dd9f2075a3fd4b0783fac361b7142 Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Wed, 19 Jun 2024 12:08:51 +0200 Subject: [PATCH] feat: Remove attach from bash completion script * Card ID: CCT-425 * Attach command was removed from bash complition script as well --auto-attach CLI option and --autosubscribe from register command --- etc-conf/subscription-manager.completion.sh | 25 ++------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/etc-conf/subscription-manager.completion.sh b/etc-conf/subscription-manager.completion.sh index 592e47b3c5..3c1ce3530f 100644 --- a/etc-conf/subscription-manager.completion.sh +++ b/etc-conf/subscription-manager.completion.sh @@ -16,23 +16,6 @@ _subscription_manager_auto_attach() COMPREPLY=($(compgen -W "${opts}" -- ${1})) } -_subscription_manager_attach() -{ - # try to autocomplete pool id's as well - # doesn't work well with sudo/non root users though - case $prev in - --pool) - # wee bit of a hack to handle that we can't actually run subscription-manager list --available unless - # we are root. try it directly (as opposed to userhelper links) and if it fails,ignore it - POOLS=$(LANG=C /usr/sbin/subscription-manager list --available 2>/dev/null | sed -ne "s|Pool ID:\s*\(\S*\)|\1|p" ) - COMPREPLY=($(compgen -W "${POOLS}" -- ${1})) - return 0 - esac - local opts="--auto --pool --quantity --servicelevel --file - ${_subscription_manager_common_opts}" - COMPREPLY=($(compgen -W "${opts}" -- ${1})) -} - _subscription_manager_syspurpose() { local opts="addons role service-level usage --show ${_subscription_manager_common_opts}" @@ -203,7 +186,7 @@ _subscription_manager_refresh() _subscription_manager_register() { - local opts="--activationkey --auto-attach --autosubscribe --baseurl --consumerid + local opts="--activationkey --baseurl --consumerid --environments --force --name --org --password --release --servicelevel --username --token ${_subscription_manager_common_url_opts} @@ -268,7 +251,7 @@ _subscription_manager() done # top-level commands and options - opts="addons attach auto-attach clean config environments facts identity import list orgs + opts="addons auto-attach clean config environments facts identity import list orgs repo-override plugins redeem refresh register release remove repos role service-level status syspurpose unregister usage version ${_subscription_manager_help_opts}" @@ -301,10 +284,6 @@ _subscription_manager() "_subscription_manager_service_level" "${cur}" "${prev}" return 0 ;; - attach) - "_subscription_manager_attach" "${cur}" "${prev}" - return 0 - ;; remove) "_subscription_manager_remove" "${cur}" "${prev}" return 0