mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-11 09:05:37 +03:00
feat: aws-vault prompt item
This commit is contained in:
parent
fbca9587ae
commit
3e759e717c
5
functions/_tide_item_aws_vault.fish
Normal file
5
functions/_tide_item_aws_vault.fish
Normal file
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 ▶
|
||||
|
18
tests/_tide_item_aws_vault.test.fish
Normal file
18
tests/_tide_item_aws_vault.test.fish
Normal file
@ -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…
Reference in New Issue
Block a user