Skip to content

Commit

Permalink
Add --no-ssh awareness to autocompleter
Browse files Browse the repository at this point in the history
  • Loading branch information
felddy committed Aug 16, 2022
1 parent c48c3c4 commit 551c99a
Showing 1 changed file with 3 additions and 0 deletions.
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 551c99a

Please sign in to comment.