We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd9d9b1 commit da4ad38Copy full SHA for da4ad38
bpython/cli.py
@@ -638,12 +638,13 @@ def _complete(self, tab=False):
638
if cs and tab:
639
# Filename completion
640
self.matches = list()
641
- user_dir = os.path.expanduser('~')
+ username = cs.split(os.path.sep, 1)[0]
642
+ user_dir = os.path.expanduser(username)
643
for filename in glob(os.path.expanduser(cs + '*')):
644
if os.path.isdir(filename):
645
filename += os.path.sep
646
if cs.startswith('~'):
- filename = '~' + filename[len(user_dir):]
647
+ filename = username + filename[len(user_dir):]
648
self.matches.append(filename)
649
self.matches_iter.update(cs, self.matches)
650
return bool(self.matches)
0 commit comments