Skip to content

Commit 488110f

Browse files
authored
Merge pull request #12 from doronz88/bugfix/isfile
argcompelete: make sure `_python_argcomplete_scan_head()` is called with a file
2 parents 5d7cffb + 4085cdc commit 488110f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

xontrib/argcomplete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def python_argcomplete(ctx: CommandContext):
102102

103103
if not args:
104104
# handle case where script is executed like `./script.py`, `./script.xsh`
105-
if os.path.exists(cmd) and _python_argcomplete_scan_head(cmd):
105+
if os.path.isfile(cmd) and _python_argcomplete_scan_head(cmd):
106106
args = [cmd]
107107

108108
if args:

0 commit comments

Comments
 (0)