Skip to content

Commit 22872d1

Browse files
committed
[Refactor] - to change format and remove echo when eval the input_peco data function. No need echo commandline
1 parent 3cadc37 commit 22872d1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

common/peco.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ peco_create_menu() {
7373
local input_function=$1
7474
local peco_options=$2
7575
local peco_command="peco ${peco_options}"
76-
local input_value=$(echo "$(eval $input_function)" | eval ${peco_command})
76+
# local input_value=$(echo "$(eval $input_function)" | eval ${peco_command})
77+
local input_value=$(eval ${input_function} | eval ${peco_command})
7778
echo ${input_value:?'Can not get the input from peco menu'}
7879
}
7980

@@ -194,12 +195,12 @@ peco_aws_ec2_list() {
194195
}
195196

196197
peco_aws_ssm_list_parameters() {
197-
commandline=" \
198+
commandline=" \
198199
aws ssm get-parameters-by-path \
199200
--path "/" \
200201
--recursive \
201202
--query 'Parameters[*].Name' \
202203
| jq -r '.[]'
203204
"
204-
peco_commandline_input ${commandline} 'true'
205-
}
205+
peco_commandline_input ${commandline} 'true'
206+
}

0 commit comments

Comments
 (0)