File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ _add() {
30
30
elif [ " $3 " == " F" ]; then
31
31
cmdType=" Fill"
32
32
elif [ " $3 " == " MF" ]; then
33
- cmdType=" Multi Fill"
33
+ cmdType=" Multi Fill $4 "
34
34
else
35
35
cmdType=" Default"
36
36
fi
@@ -74,9 +74,9 @@ _excute() {
74
74
if [ " $1 " = " $line " ]; then
75
75
read -u9 line
76
76
read -u9 cmdType
77
- if [ " $cmdType " == " Fill " ]; then
78
- eval " ${ line/ \? / $2 } "
79
- elif [ " $cmdType " == " Multi Fill" ]; then
77
+ if [ " $cmdType " == " Default " ]; then
78
+ eval $ line
79
+ elif [ " $cmdType " == " Fill" ]; then
80
80
eval " ${line// \? / $2 } "
81
81
elif [ " $cmdType " == " Dynamic" ]; then
82
82
cmds=()
@@ -86,6 +86,12 @@ _excute() {
86
86
done
87
87
eval $line $cmds
88
88
else
89
+ fills=(${cmdType// / } )
90
+ for i in $( seq 1 ${fills[2]} ) ; do
91
+ let num=$i +1
92
+ eval arg=\$ $num
93
+ line=${line// \? $i / $arg }
94
+ done
89
95
eval $line
90
96
fi
91
97
return 0
@@ -140,7 +146,7 @@ al(){
140
146
if [ $1 = " ls" ]; then
141
147
_list
142
148
elif [ $1 = " add" ]; then
143
- _add $2 " $3 " $4
149
+ _add $2 " $3 " $4 $5
144
150
elif [ $1 = " rm" ]; then
145
151
_remove $2
146
152
elif [ $1 = " -h" ]; then
You can’t perform that action at this time.
0 commit comments