Skip to content

Commit 14bb337

Browse files
committed
refactor: add $ symbol to para variable - tcsh will use ! instead of $
1 parent 9ea77ba commit 14bb337

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

β€Žgenerator.shβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ for shell in sh bash fish ksh zsh; do
4343
else='; else '
4444
endIf='; fi'
4545
brackets='()'
46-
para='*'
4746
startSym=' {
4847
'
4948
endSym='
5049
}'
50+
para='$*'
5151
;;
5252
"ksh")
5353
fn='function '
@@ -58,11 +58,11 @@ for shell in sh bash fish ksh zsh; do
5858
else='; else '
5959
endIf='; fi'
6060
brackets=
61-
para='*'
6261
startSym=' {
6362
'
6463
endSym='
6564
}'
65+
para='$*'
6666
;;
6767
"fish")
6868
fn='function '
@@ -73,11 +73,11 @@ for shell in sh bash fish ksh zsh; do
7373
else='; else; '
7474
endIf='; end'
7575
brackets=
76-
para='argv'
7776
startSym='
7877
'
7978
endSym='
8079
end'
80+
para='$argv'
8181
;;
8282
"sh")
8383
fn=
@@ -89,11 +89,11 @@ end'
8989
else='; else '
9090
endIf='; fi'
9191
brackets='()'
92-
para='*'
9392
startSym=' {
9493
'
9594
endSym='
9695
}'
96+
para='$*'
9797
;;
9898
esac
9999

@@ -178,7 +178,7 @@ SH_ECHO
178178
echo ""
179179
printf "%s%s" "${echoFunction}" "${brackets}"
180180
# write the code down
181-
echo "${startSym}${echo}"' "\\033['"${finalStyleCode}${code}${colorCode}"'m$'"${para}"'\\033[m"'"${endSym}"
181+
echo "${startSym}${echo}"' "\\033['"${finalStyleCode}${code}${colorCode}m${para}"'\\033[m"'"${endSym}"
182182
} >> "${tempDist}"
183183
fi
184184
done
@@ -201,13 +201,13 @@ SH_ECHO
201201
esac
202202

203203
cat << LOLCAT >> "${tempDist}"
204-
${fnName}${startSym}${if}${ifCond}${then}echo "\$${para}" | lolcat${else}echo "\$${para}"${endIf}${endSym}
204+
${fnName}${startSym}${if}${ifCond}${then}echo "${para}" | lolcat${else}echo "${para}"${endIf}${endSym}
205205
LOLCAT
206206

207207
# echo.Reset to remove color code on output
208208
fnName="${fn}echo${dot}Reset${brackets}"
209209
cat << RESET >> "${tempDist}"
210-
${fnName}${startSym}echo "\$${para}" | tr -d '[:cntrl:]' | sed -E "s/\\\\[((;)?[0-9]{1,3}){0,3}m//g" | xargs${endSym}
210+
${fnName}${startSym}echo "${para}" | tr -d '[:cntrl:]' | sed -E "s/\\\\[((;)?[0-9]{1,3}){0,3}m//g" | xargs${endSym}
211211
RESET
212212
mv -f "${tempDist}" "${newDist}"
213213
} &

0 commit comments

Comments
Β (0)