Skip to content

Commit 4e4df8b

Browse files
committed
All Fills and Milti Fills are now just Fills. While the new Multi Fill is now is a combination of Fill and Dynamic
1 parent 7f46643 commit 4e4df8b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

aliasme.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _add() {
3030
elif [ "$3" == "F" ]; then
3131
cmdType="Fill"
3232
elif [ "$3" == "MF" ]; then
33-
cmdType="Multi Fill"
33+
cmdType="Multi Fill $4"
3434
else
3535
cmdType="Default"
3636
fi
@@ -74,9 +74,9 @@ _excute() {
7474
if [ "$1" = "$line" ]; then
7575
read -u9 line
7676
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
8080
eval "${line//\?/$2}"
8181
elif [ "$cmdType" == "Dynamic" ]; then
8282
cmds=()
@@ -86,6 +86,12 @@ _excute() {
8686
done
8787
eval $line $cmds
8888
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
8995
eval $line
9096
fi
9197
return 0
@@ -140,7 +146,7 @@ al(){
140146
if [ $1 = "ls" ]; then
141147
_list
142148
elif [ $1 = "add" ]; then
143-
_add $2 "$3" $4
149+
_add $2 "$3" $4 $5
144150
elif [ $1 = "rm" ]; then
145151
_remove $2
146152
elif [ $1 = "-h" ]; then

0 commit comments

Comments
 (0)