diff options
| author | kmvanbrunt <kmvanbrunt@gmail.com> | 2018-08-01 03:57:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-01 03:57:13 -0400 |
| commit | 54cd5f7b22bade4361e507b22b68dcf69ba8dd4a (patch) | |
| tree | e2e8cb7aee957960d29dc338bf65ea6725d1c5a3 | |
| parent | 3ec6cea21a97ac7adc4db4cbb809626a3fdeee7d (diff) | |
| parent | 4b2702480b99a733a1f65a60f86eedb1e6bf259a (diff) | |
| download | cmd2-git-54cd5f7b22bade4361e507b22b68dcf69ba8dd4a.tar.gz | |
Merge pull request #493 from python-cmd2/extra_slash
Fixed case where extra slash was printing when tab completing users on Windows
| -rw-r--r-- | CHANGELOG.md | 6 | ||||
| -rwxr-xr-x | cmd2.py | 9 | ||||
| -rw-r--r-- | docs/conf.py | 2 | ||||
| -rwxr-xr-x | setup.py | 2 | ||||
| -rw-r--r-- | tests/test_cmd2.py | 2 |
5 files changed, 14 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 83e444b4..7d0e4446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## 0.8.8 (TBD, 2018) +## 0.8.9 (August TBD, 2018) +* Bug Fixes + * Fixed extra slash that could print when tab completing users on Windows + +## 0.8.8 (June 28, 2018) * Bug Fixes * Prevent crashes that could occur attempting to open a file in non-existent directory or with very long filename * Enhancements @@ -229,7 +229,7 @@ if six.PY2 and sys.platform.startswith('lin'): pass -__version__ = '0.8.8' +__version__ = '0.8.9' # Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past pyparsing.ParserElement.enablePackrat() @@ -1694,12 +1694,15 @@ class Cmd(cmd.Cmd): users = [] # Windows lacks the pwd module so we can't get a list of users. - # Instead we will add a slash once the user enters text that + # Instead we will return a result once the user enters text that # resolves to an existing home directory. if sys.platform.startswith('win'): expanded_path = os.path.expanduser(text) if os.path.isdir(expanded_path): - users.append(text + os.path.sep) + user = text + if add_trailing_sep_if_dir: + user += os.path.sep + users.append(user) else: import pwd diff --git a/docs/conf.py b/docs/conf.py index 71dff86e..3a7a57dc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,7 +62,7 @@ author = 'Catherine Devlin and Todd Leonhardt' # The short X.Y version. version = '0.8' # The full version, including alpha/beta/rc tags. -release = '0.8.8' +release = '0.8.9' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -8,7 +8,7 @@ import sys import setuptools from setuptools import setup -VERSION = '0.8.8' +VERSION = '0.8.9' DESCRIPTION = "cmd2 - a tool for building interactive command line applications in Python" LONG_DESCRIPTION = """cmd2 is a tool for building interactive command line applications in Python. Its goal is to make it quick and easy for developers to build feature-rich and user-friendly interactive command line applications. It diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 17577e2b..7c643009 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -26,7 +26,7 @@ from conftest import run_cmd, normalize, BASE_HELP, BASE_HELP_VERBOSE, \ def test_ver(): - assert cmd2.__version__ == '0.8.8' + assert cmd2.__version__ == '0.8.9' def test_empty_statement(base_app): |
