Skip to content

Commit e09a460

Browse files
committed
~ only needs to be expanded if search text was entered
1 parent d41fd7c commit e09a460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ def path_complete(text, line, begidx, endidx, dir_exe_only=False, dir_only=False
350350
# Build the search string
351351
search_str = os.path.join(dirname, text + '*')
352352

353-
# Expand "~" to the real user directory
354-
search_str = os.path.expanduser(search_str)
353+
# Expand "~" to the real user directory
354+
search_str = os.path.expanduser(search_str)
355355

356356
# Find all matching path completions
357357
path_completions = glob.glob(search_str)

0 commit comments

Comments
 (0)