Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: aws-vault prompt item #488

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_bun_bg_color 14151A
tide_bun_color FBF0DF
tide_character_color $_tide_color_green
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_bun_bg_color black
tide_bun_color white
tide_character_color brgreen
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_bun_bg_color normal
tide_bun_color FBF0DF
tide_character_color $_tide_color_green
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_bun_bg_color normal
tide_bun_color white
tide_character_color brgreen
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_bun_bg_color FBF0DF
tide_bun_color 14151A
tide_character_color $_tide_color_green
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_bun_bg_color white
tide_bun_color black
tide_character_color brgreen
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_bun_icon 󰳓
tide_character_icon ❯
tide_character_vi_icon_default ❮
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
Loading