File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
awscli/customizations/configure
tests/unit/customizations/configure Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,15 @@ class WindowsCmdFormatter(BasePerLineFormatter):
117117 _VAR_FORMAT = 'set {var_name}={var_value}'
118118
119119
120+ class FishShellFormatter (BasePerLineFormatter ):
121+ FORMAT = 'fish'
122+ DOCUMENTATION = (
123+ 'Display credentials as Fish shell environment variables: '
124+ '``set -gx AWS_ACCESS_KEY_ID EXAMPLE``'
125+ )
126+ _VAR_FORMAT = 'set -gx {var_name} {var_value}'
127+
128+
120129class CredentialProcessFormatter (BaseCredentialFormatter ):
121130 FORMAT = 'process'
122131 DOCUMENTATION = (
@@ -152,6 +161,7 @@ def display_credentials(self, credentials):
152161 BashNoExportEnvFormatter ,
153162 PowershellFormatter ,
154163 WindowsCmdFormatter ,
164+ FishShellFormatter ,
155165 ]
156166}
157167
Original file line number Diff line number Diff line change 2626 ConfigureExportCredentialsCommand ,
2727 CredentialProcessFormatter ,
2828 Credentials ,
29+ FishShellFormatter ,
2930 PowershellFormatter ,
3031 WindowsCmdFormatter ,
3132 convert_botocore_credentials ,
@@ -109,6 +110,21 @@ def __eq__(self, other):
109110 ),
110111 ),
111112 ),
113+ (
114+ FishShellFormatter ,
115+ (
116+ (
117+ 'set -gx AWS_ACCESS_KEY_ID access_key\n '
118+ 'set -gx AWS_SECRET_ACCESS_KEY secret_key\n '
119+ ),
120+ (
121+ 'set -gx AWS_ACCESS_KEY_ID access_key\n '
122+ 'set -gx AWS_SECRET_ACCESS_KEY secret_key\n '
123+ 'set -gx AWS_SESSION_TOKEN token\n '
124+ 'set -gx AWS_CREDENTIAL_EXPIRATION 2023-01-01T00:00:00Z\n '
125+ ),
126+ ),
127+ ),
112128 (
113129 CredentialProcessFormatter ,
114130 (
You can’t perform that action at this time.
0 commit comments