[Python-checkins] CVS: python/dist/src/Lib cmd.py,1.17,1.18
Eric S. Raymond
python-dev@python.org
2000年7月11日 06:03:58 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv9661
Modified Files:
cmd.py
Log Message:
Bug fix: ? and ! were not full aliases for `help' and `shell' as implied in
the documentation; the cases `? foo' and `! foo' failed.
Index: cmd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cmd.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** cmd.py 2000年02月02日 15:10:14 1.17
--- cmd.py 2000年07月11日 13:03:55 1.18
***************
*** 91,103 ****
def onecmd(self, line):
line = string.strip(line)
! if line == '?':
! line = 'help'
! elif line == '!':
if hasattr(self, 'do_shell'):
! line = 'shell'
else:
return self.default(line)
- elif not line:
- return self.emptyline()
self.lastcmd = line
i, n = 0, len(line)
--- 91,103 ----
def onecmd(self, line):
line = string.strip(line)
! if not line:
! return self.emptyline()
! elif line[0] == '?':
! line = 'help ' + line[1:]
! elif line[0] == '!':
if hasattr(self, 'do_shell'):
! line = 'shell ' + line[1:]
else:
return self.default(line)
self.lastcmd = line
i, n = 0, len(line)