Skip to content

Commit

Permalink
Merge pull request #424 from h00die/autocomplete
Browse files Browse the repository at this point in the history
Fix module list generation for autocomplete
  • Loading branch information
DaveYesland authored May 24, 2024
2 parents 80d6ea9 + 1838f0e commit 017df0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pacu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ def initialize_tab_completion(self) -> None:
category_path = os.path.realpath(root)

# Skip any directories inside module directories.
if os.path.dirname(category_path) != modules_directory_path:
if os.path.dirname(category_path) == modules_directory_path:
continue
# Skip the root directory.
elif modules_directory_path == category_path:
Expand Down Expand Up @@ -1621,7 +1621,7 @@ def complete(completer, text, state):
if len(line) == 1 and (line[0] == 'help'):
return [c + ' ' for c in MODULES + self.COMMANDS][state]

if len(line) == 1 and (line[0] == 'exec' or line[0] == 'run'):
if len(line) == 1 and (line[0] in ['exec', 'run']):
return [c + ' ' for c in MODULES][state]

# account for last argument ending in a space
Expand Down

0 comments on commit 017df0b

Please sign in to comment.