Skip to content

Commit ce6117f

Browse files
author
bob
committed
Thanks to Trundle for this bugfix relating to tab-completion when there are no
suggestions available.
1 parent d16702c commit ce6117f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bpython/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,9 @@ def strbase(self, l):
13441344
"""Probably not the best way of doing it but this function returns
13451345
a common base string in a list of strings (for tab completion)."""
13461346

1347-
if len(l) == 1:
1347+
if not l:
1348+
return ''
1349+
elif len(l) == 1:
13481350
return l[0]
13491351

13501352
sl = sorted(l, key=str.__len__)

0 commit comments

Comments
 (0)