-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_saml2aws-auto
More file actions
36 lines (29 loc) · 761 Bytes
/
_saml2aws-auto
File metadata and controls
36 lines (29 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#compdef saml2aws-auto
_saml2aws-auto_refresh() {
local -a groups
groups=$(grep -v "accounts" ~/.saml2aws-auto.yml | grep '^[[:space:]]\{2\}\(.*\):$' | tr -d ' :')
_alternative "argument:group:($groups)"
}
_saml2aws-auto() {
local line
_commands() {
local -a commands
commands=(
'refresh:Refreshes all credentials for a group'
'configure:Configure saml2aws-auto settings like your IDP'
'help:Prints this message or the help of the given subcommand(s)'
'version:Displays the version'
'groups:Manage role groups'
)
_describe 'command' commands
}
_arguments -C \
"1: :_commands" \
"*::arg:->args"
case $line[1] in
refresh)
_saml2aws-auto_refresh
;;
esac
}
_saml2aws-auto