Skip to content

Commit

Permalink
feat: aws-vault prompt item
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahsis committed Feb 2, 2024
1 parent fbca958 commit 3e759e7
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions functions/_tide_item_aws_vault.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function _tide_item_aws_vault
if test -n "$AWS_VAULT"
_tide_print_item aws_vault $tide_aws_vault_icon' ' "$AWS_VAULT"
end
end
2 changes: 2 additions & 0 deletions functions/tide/configure/configs/classic.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tide_aws_bg_color 444444
tide_aws_color FF9900
tide_aws_vault_bg_color FF3333
tide_aws_vault_color 1A0000
tide_character_color $_tide_color_green
tide_character_color_failure FF0000
tide_cmd_duration_bg_color 444444
Expand Down
2 changes: 2 additions & 0 deletions functions/tide/configure/configs/classic_16color.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tide_aws_bg_color black
tide_aws_color yellow
tide_aws_vault_bg_color black
tide_aws_vault_color brred
tide_character_color brgreen
tide_character_color_failure brred
tide_cmd_duration_bg_color black
Expand Down
2 changes: 2 additions & 0 deletions functions/tide/configure/configs/lean.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tide_aws_bg_color normal
tide_aws_color FF9900
tide_aws_vault_bg_color normal
tide_aws_vault_color FF3333
tide_character_color $_tide_color_green
tide_character_color_failure FF0000
tide_cmd_duration_bg_color normal
Expand Down
2 changes: 2 additions & 0 deletions functions/tide/configure/configs/lean_16color.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tide_aws_bg_color normal
tide_aws_color yellow
tide_aws_vault_bg_color normal
tide_aws_vault_color brred
tide_character_color brgreen
tide_character_color_failure brred
tide_cmd_duration_bg_color normal
Expand Down
2 changes: 2 additions & 0 deletions functions/tide/configure/configs/rainbow.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tide_aws_bg_color FF9900
tide_aws_color 232F3E
tide_aws_vault_bg_color FF3333
tide_aws_vault_color 1A0000
tide_character_color $_tide_color_green
tide_character_color_failure FF0000
tide_cmd_duration_bg_color C4A000
Expand Down
2 changes: 2 additions & 0 deletions functions/tide/configure/configs/rainbow_16color.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
tide_aws_bg_color yellow
tide_aws_color brblack
tide_aws_vault_bg_color brred
tide_aws_vault_color black
tide_character_color brgreen
tide_character_color_failure brred
tide_cmd_duration_bg_color yellow
Expand Down
1 change: 1 addition & 0 deletions functions/tide/configure/icons.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tide_aws_icon  # Actual aws glyph is harder to see
tide_aws_vault_icon 
tide_character_icon ❯
tide_character_vi_icon_default ❮
tide_character_vi_icon_replace ▶
Expand Down
18 changes: 18 additions & 0 deletions tests/_tide_item_aws_vault.test.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# RUN: %fish %s
_tide_parent_dirs

function _aws_vault
_tide_decolor (_tide_item_aws_vault)
end

set -lx tide_aws_vault_icon 

_aws_vault # CHECK:

set -lx AWS_VAULT TestAcc1

_aws_vault # CHECK:  TestAcc1

set -lx AWS_VAULT TestAcc2

_aws_vault # CHECK:  TestAcc2

0 comments on commit 3e759e7

Please sign in to comment.