[yum-cvs] yum shell.py,1.35,1.36
James Bowes
jbowes at linux.duke.edu
Wed Dec 20 00:04:53 UTC 2006
Update of /home/groups/yum/cvs/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv814
Modified Files:
shell.py
Log Message:
Add tab completion for yum commands to the shell
Index: shell.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/shell.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- shell.py 5 Dec 2006 00:40:51 -0000 1.35
+++ shell.py 20 Dec 2006 00:04:51 -0000 1.36
@@ -90,7 +90,14 @@
def emptyline(self):
pass
-
+
+ def completenames(self, text, line, begidx, endidx):
+ ret = cmd.Cmd.completenames(self, text, line, begidx, endidx)
+ for command in self.base.yum_cli_commands.keys():
+ if command.startswith(text) and command != "shell":
+ ret.append(command)
+ return ret
+
def do_help(self, arg):
msg = """
Shell specific arguments:
More information about the Yum-cvs-commits
mailing list