Skip to content

Commit

Permalink
bump version, merge pull request #17 from iterative/devel
Browse files Browse the repository at this point in the history
search curdir for modules
  • Loading branch information
casperdcl authored Jul 29, 2020
2 parents f9b0795 + 545b03c commit 82cf362
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shtab/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import argparse
import logging
import os
import sys
from importlib import import_module

from . import __version__, complete
Expand Down Expand Up @@ -43,6 +45,8 @@ def main(argv=None):
log.debug(args)

module, other_parser = args.parser.rsplit(".", 1)
if sys.path and sys.path[0]: # not blank so not searching curdir
sys.path.insert(1, os.curdir)
try:
module = import_module(module)
except ImportError as err:
Expand Down

0 comments on commit 82cf362

Please sign in to comment.