Skip to content

Commit

Permalink
Multiple arguments is possible now (gazayas#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaroslaw Wiosna committed Nov 13, 2016
1 parent a6eac1f commit 56c0640
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions http
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,17 @@ function colors () {

# If an argument is passed: i.e. - "$ http 200"
# 「$ http 200」みたいに引数を渡す場合
if [ $1 ]; then
for i in ${statuses[@]};
do
if [[ "$i" =~ ^"${1}" ]]; then
colors $i
fi
done
fi

for k in $@
do
if [ $k ]; then
for i in ${statuses[@]};
do
if [[ "$i" =~ ^"${k}" ]]; then
colors $i
fi
done
fi
done
# If "-l" is passed as an argument (the master list)
# 「-l」が引数として渡された場合(マスターリストを表示する)
if [[ $1 =~ "-l" ]]; then
Expand Down

0 comments on commit 56c0640

Please sign in to comment.