Skip to content

Commit 8720b71

Browse files
committed
[remove] - do not have to specific type output-text when create a peco_input function
1 parent c520d3e commit 8720b71

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

common/peco.sh

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ peco_aws_acm_list() {
1515
}
1616

1717
peco_aws_input() {
18-
aws_cli_commandline=$1
18+
aws_cli_commandline="${1} --output text"
1919
result_cached=$2
2020

2121
md5_hash=$(echo $aws_cli_commandline | md5)
@@ -44,37 +44,52 @@ peco_aws_input() {
4444

4545
# AWS Logs
4646
peco_aws_logs_list() {
47-
peco_aws_input 'aws logs describe-log-groups --query "*[].logGroupName" --output text' 'true'
47+
peco_aws_input 'aws logs describe-log-groups --query "*[].logGroupName"' 'true'
4848
}
4949

5050
# AWS ECS
5151
peco_aws_ecs_list_clusters() {
52-
peco_aws_input 'aws ecs list-clusters --query "*[]" --output text' 'true'
52+
peco_aws_input 'aws ecs list-clusters --query "*[]"' 'true'
5353
}
5454

5555
peco_aws_ecs_list_services() {
56-
peco_aws_input 'aws ecs list-services --cluster $aws_ecs_cluster_arn --query "*[]" --output text'
56+
peco_aws_input 'aws ecs list-services --cluster $aws_ecs_cluster_arn --query "*[]"'
5757
}
5858

5959
# AWS ECR
6060

6161
peco_aws_list_repositorie_names() {
62-
peco_aws_input 'aws ecr describe-repositories --query "*[].repositoryName" --output text' 'true'
62+
peco_aws_input 'aws ecr describe-repositories --query "*[].repositoryName"' 'true'
6363
}
6464

6565
# AWS RDS
6666
peco_aws_list_db_parameter_groups() {
67-
peco_aws_input 'aws rds describe-db-parameter-groups --query "*[].DBParameterGroupName" --output text' 'true'
67+
peco_aws_input 'aws rds describe-db-parameter-groups --query "*[].DBParameterGroupName"' 'true'
6868
}
6969

7070
peco_aws_list_db_cluster_parameter_groups() {
71-
peco_aws_input 'aws rds describe-db-cluster-parameter-groups --query "*[].DBClusterParameterGroupName" --output text' 'true'
71+
peco_aws_input 'aws rds describe-db-cluster-parameter-groups --query "*[].DBClusterParameterGroupName"' 'true'
7272
}
7373

7474
peco_aws_list_db_clusters() {
75-
peco_aws_input 'aws rds describe-db-clusters --query "*[].DBClusterIdentifier" --output text' 'true'
75+
peco_aws_input 'aws rds describe-db-clusters --query "*[].DBClusterIdentifier"' 'true'
7676
}
7777

7878
peco_aws_list_db_instances() {
79-
peco_aws_input 'aws rds describe-db-instances --query "*[].DBInstanceIdentifier" --output text' 'true'
79+
peco_aws_input 'aws rds describe-db-instances --query "*[].DBInstanceIdentifier"' 'true'
80+
}
81+
82+
# Lambda
83+
peco_aws_lambda_list() {
84+
peco_aws_input 'aws lambda list-functions --query "*[].FunctionName"' 'true'
85+
}
86+
87+
# S3
88+
peco_aws_s3_list() {
89+
peco_aws_input 'aws s3api list-buckets --query "Buckets[].Name"' 'true'
90+
}
91+
92+
# Codebuild
93+
peco_aws_codebuild_list() {
94+
peco_aws_input 'aws codebuild list-projects --query "*[]"' 'true'
8095
}

0 commit comments

Comments
 (0)