Skip to content

Commit 54cd5f7

Browse files
authored
Merge pull request #493 from python-cmd2/extra_slash
Fixed case where extra slash was printing when tab completing users on Windows
2 parents 3ec6cea + 4b27024 commit 54cd5f7

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 0.8.8 (TBD, 2018)
1+
## 0.8.9 (August TBD, 2018)
2+
* Bug Fixes
3+
* Fixed extra slash that could print when tab completing users on Windows
4+
5+
## 0.8.8 (June 28, 2018)
26
* Bug Fixes
37
* Prevent crashes that could occur attempting to open a file in non-existent directory or with very long filename
48
* Enhancements

cmd2.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def pyreadline_remove_history_item(pos):
229229
pass
230230

231231

232-
__version__ = '0.8.8'
232+
__version__ = '0.8.9'
233233

234234
# Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past
235235
pyparsing.ParserElement.enablePackrat()
@@ -1694,12 +1694,15 @@ def complete_users():
16941694
users = []
16951695

16961696
# Windows lacks the pwd module so we can't get a list of users.
1697-
# Instead we will add a slash once the user enters text that
1697+
# Instead we will return a result once the user enters text that
16981698
# resolves to an existing home directory.
16991699
if sys.platform.startswith('win'):
17001700
expanded_path = os.path.expanduser(text)
17011701
if os.path.isdir(expanded_path):
1702-
users.append(text + os.path.sep)
1702+
user = text
1703+
if add_trailing_sep_if_dir:
1704+
user += os.path.sep
1705+
users.append(user)
17031706
else:
17041707
import pwd
17051708

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# The short X.Y version.
6363
version = '0.8'
6464
# The full version, including alpha/beta/rc tags.
65-
release = '0.8.8'
65+
release = '0.8.9'
6666

6767
# The language for content autogenerated by Sphinx. Refer to documentation
6868
# for a list of supported languages.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import setuptools
99
from setuptools import setup
1010

11-
VERSION = '0.8.8'
11+
VERSION = '0.8.9'
1212
DESCRIPTION = "cmd2 - a tool for building interactive command line applications in Python"
1313
LONG_DESCRIPTION = """cmd2 is a tool for building interactive command line applications in Python. Its goal is to make
1414
it quick and easy for developers to build feature-rich and user-friendly interactive command line applications. It

tests/test_cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
def test_ver():
29-
assert cmd2.__version__ == '0.8.8'
29+
assert cmd2.__version__ == '0.8.9'
3030

3131

3232
def test_empty_statement(base_app):

0 commit comments

Comments
 (0)