-
Notifications
You must be signed in to change notification settings - Fork 0
/
_cf_login.bash
executable file
·29 lines (26 loc) · 815 Bytes
/
_cf_login.bash
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
# for use with two-layer-completion.bash
# echo the desired completion options for cf_login script
layer=$1
prev_word=$2
case ${layer} in
"1"*)
echo "aws gcp"
exit
;;
"2"*)
if [[ ${prev_word} == "aws" ]] ; then
echo "cupcake swissroll victoriasponge"
exit
elif [[ ${prev_word} == "gcp" ]] ; then
# This list was retrieved via " list-envs names | awk '{printf "%s ", $1}' " on January 11th 2018.
options="elcerrito monaco kingcity murrieta southlaketahoe amadorcity havana missionviejo clayton lapuente palosverdesestates colfax coachella hughson walnutcreek ranchomirage biggs bradbury huron luxembourg palmdesert redlands"
echo $options
exit
else
#echo "COMPLETION_ERROR_Previous_word_not_recognised"
exit
fi
;;
*)
;;
esac