Skip to content

Commit

Permalink
Various cleanup changes:
Browse files Browse the repository at this point in the history
1) Removed unused buildout.cfg file
2) Removed unused debian directory
3) Reordered items in CHANGES.rst so that newer ones appear at the top
4) Moved all of the command alias function declarations together (to make it easier to chop them out)
- Command aliases are unnecessary and redundant, particularly due to the abbreviated command acceptance feature.
  • Loading branch information
tleonhardt committed Feb 5, 2017
1 parent 749f219 commit 4566029
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 75 deletions.
64 changes: 42 additions & 22 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
News
====

0.6.5
0.7.0
-----

*Release date: 2013-02-29*
*Release date: 2017-TBD*

* Belatedly began a NEWS.txt
* Changed pyparsing requirement for compatibility with Python version (2 vs 3)
* Refactored to use six module for a unified codebase which supports both Python 2 and Python 3
* Stabilized on all platforms (Windows, Mac, Linux) and all supported Python versions (2.7, 3.3, 3.4, 3.5, 3.6, PyPy)
* Added lots of unit tests and fixed a number of bugs
* Improved documentation and moved it to cmd2.readthedocs.io

0.6.5.1
-------

*Release date: 2013-03-18*
0.6.9
-----

* Bugfix for setup.py version check for Python 2.6, contributed by Tomaz Muraus (https://bitbucket.org/kami)
*Release date: 2016-10-03*

0.6.6
* Support Python 3 input()
* Fix subprocess.mswindows bug
* Add Python3.6 support
* Drop distutils from setup.py


0.6.8
-----

*Release date: 2013-08-06*
*Release date: 2014-12-09*

* better editor checking (by Ian Cordascu)

* Added fix by bitbucket.org/desaintmartin to silence the editor check. bitbucket.org/catherinedevlin/cmd2/issue/1/silent-editor-check

0.6.6.1
-------
Expand All @@ -30,22 +38,34 @@ News

* No changes to code trunk. Generated sdist from Python 2.7 to avoid 2to3 changes being applied to source. (Issue https://bitbucket.org/catherinedevlin/cmd2/issue/6/packaging-bug)

0.6.8

0.6.6
-----

*Release date: 2014-12-09*
*Release date: 2013-08-06*

* better editor checking (by Ian Cordascu)
* Added fix by bitbucket.org/desaintmartin to silence the editor check. bitbucket.org/catherinedevlin/cmd2/issue/1/silent-editor-check

0.6.9
-----

* Support Python 3 input()
* Fix subprocess.mswindows bug
* Add Python3.6 support
* Drop distutils from setup.py
0.6.5.1
-------

0.7.0
*Release date: 2013-03-18*

* Bugfix for setup.py version check for Python 2.6, contributed by Tomaz Muraus (https://bitbucket.org/kami)


0.6.5
-----

* Refactor to use six module for a unified codebase which supports both Python 2 and Python 3
*Release date: 2013-02-29*

* Belatedly began a NEWS.txt
* Changed pyparsing requirement for compatibility with Python version (2 vs 3)







8 changes: 0 additions & 8 deletions buildout.cfg

This file was deleted.

26 changes: 11 additions & 15 deletions cmd2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,14 +1059,9 @@ def _cmdloop(self, intro=None):
def do_EOF(self, arg):
return self._STOP_SCRIPT_NO_EXIT # End of script; should not exit app

do_eof = do_EOF

def do_quit(self, arg):
return self._STOP_AND_EXIT

do_exit = do_quit
do_q = do_quit

def select(self, options, prompt='Your choice? '):
'''Presents a numbered menu to the user. Modelled after
the bash shell's SELECT. Returns the item chosen.
Expand Down Expand Up @@ -1254,10 +1249,6 @@ def do_list(self, arg):
for hi in history:
self.poutput(hi.pr())

do_hi = do_history
do_l = do_list
do_li = do_list

def do_ed(self, arg):
"""ed: edit most recent command in text editor
ed [N]: edit numbered command from history
Expand Down Expand Up @@ -1286,8 +1277,6 @@ def do_ed(self, arg):
os.system('%s %s' % (self.editor, filename))
self.do__load(filename)

do_edit = do_ed

saveparser = (pyparsing.Optional(pyparsing.Word(pyparsing.nums) ^ '*')("idx") +
pyparsing.Optional(pyparsing.Word(legalChars + '/\\'))("fname") +
pyparsing.stringEnd)
Expand Down Expand Up @@ -1377,8 +1366,6 @@ def do_load(self, arg=None):
self.lastcmd = ''
return stop and (stop != self._STOP_SCRIPT_NO_EXIT)

do__load = do_load # avoid an unfortunate legacy use of do_load from sqlpython

def do_run(self, arg):
"""run [arg]: re-runs an earlier command
Expand All @@ -1393,8 +1380,6 @@ def do_run(self, arg):
if runme:
stop = self.onecmd_plus_hooks(runme)

do_r = do_run

def runTranscriptTests(self, callargs):
class TestMyAppCase(Cmd2TestCase):
CmdApp = self.__class__
Expand Down Expand Up @@ -1423,6 +1408,17 @@ def cmdloop(self, intro=None):
if not self.run_commands_at_invocation(callargs):
self._cmdloop()

# Command Aliases
do_eof = do_EOF
do_exit = do_quit
do_q = do_quit
do_hi = do_history
do_l = do_list
do_li = do_list
do_edit = do_ed
do__load = do_load # avoid an unfortunate legacy use of do_load from sqlpython
do_r = do_run


class HistoryItem(str):
listformat = '-------------------------[%d]\n%s\n'
Expand Down
7 changes: 0 additions & 7 deletions debian/changelog

This file was deleted.

1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

14 changes: 0 additions & 14 deletions debian/control

This file was deleted.

1 change: 0 additions & 1 deletion debian/pycompat

This file was deleted.

7 changes: 0 additions & 7 deletions debian/rules

This file was deleted.

0 comments on commit 4566029

Please sign in to comment.