Skip to content

Commit

Permalink
Merge pull request #18 from cisagov/improvement/complete-no-ssh
Browse files Browse the repository at this point in the history
Add --no-ssh option awareness to autocompleter
  • Loading branch information
felddy committed Aug 16, 2022
2 parents c48c3c4 + b52afdc commit b8b0c66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/awssh/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""This file defines the version of this module."""
__version__ = "1.0.1"
__version__ = "1.0.2"
3 changes: 3 additions & 0 deletions src/awssh/autocompleter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
HELP_OPTIONS = {"--help", "-h"}
LOG_LEVEL_OPTIONS = {"--log-level"}
LOG_LEVELS = {"debug", "info", "warning", "error", "critical"}
NO_SSH_OPTIONS = {"--no-ssh", "-n"}
REGION_OPTIONS = {"--region", "-r"}
SSH_ARGS_OPTIONS = {"--ssh-args", "-s"}

Expand Down Expand Up @@ -141,6 +142,8 @@ def build_option_candidates(word_set: set[str]) -> set[str]:
candidates |= CREDENTIALS_OPTIONS
if not LOG_LEVEL_OPTIONS & word_set:
candidates |= LOG_LEVEL_OPTIONS
if not NO_SSH_OPTIONS & word_set:
candidates |= NO_SSH_OPTIONS
if not REGION_OPTIONS & word_set:
candidates |= REGION_OPTIONS
if not SSH_ARGS_OPTIONS & word_set:
Expand Down

0 comments on commit b8b0c66

Please sign in to comment.