https://bugzilla.redhat.com/show_bug.cgi?id=618154 --- cli.py | 3 ++- etc/yum.bash | 6 +++--- yumcommands.py | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/cli.py b/cli.py index f667b46..a2a05bd 100644 --- a/cli.py +++ b/cli.py @@ -139,7 +139,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput): names and summary usages. """ usage = 'yum [options] COMMAND\n\nList of Commands:\n\n' - commands = yum.misc.unique(self.yum_cli_commands.values()) + commands = yum.misc.unique([x for x in self.yum_cli_commands.values() + if not (hasattr(x, 'hidden') and x.hidden)]) commands.sort(key=lambda x: x.getNames()[0]) for command in commands: # XXX Remove this when getSummary is common in plugins diff --git a/etc/yum.bash b/etc/yum.bash index 01ee3be..25d3cc6 100644 --- a/etc/yum.bash +++ b/etc/yum.bash @@ -82,15 +82,15 @@ _yum() # Commands offered as completions local cmds=( check check-update clean deplist distro-sync downgrade groupinfo groupinstall grouplist groupremove help history info install - list localinstall localupdate makecache provides reinstall remove - repolist resolvedep search shell update upgrade version ) + list makecache provides reinstall remove repolist resolvedep search + shell update upgrade version ) local i c cmd subcmd for (( i=1; i < ${#comp_wor...@]}-1; i++ )) ; do [[ -n $cmd ]] && subcmd=${COMP_WORDS[i]} && break # Recognize additional commands and aliases for c in ${cm...@]} check-rpmdb distribution-synchronization erase \ - groupupdate grouperase whatprovides ; do + groupupdate grouperase localinstall localupdate whatprovides ; do [ ${COMP_WORDS[i]} = $c ] && cmd=$c && break done done diff --git a/yumcommands.py b/yumcommands.py index 517e6b9..3c009f8 100644 --- a/yumcommands.py +++ b/yumcommands.py @@ -145,6 +145,7 @@ class YumCommand: def __init__(self): self.done_command_once = False + self.hidden = False def doneCommand(self, base, msg, *args): if not self.done_command_once: @@ -711,6 +712,10 @@ class UpgradeCommand(YumCommand): return 1, [str(e)] class LocalInstallCommand(YumCommand): + def __init__(self): + YumCommand.__init__(self) + self.hidden = True + def getNames(self): return ['localinstall', 'localupdate'] -- 1.7.2.3 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel