@@ -43,8 +43,8 @@ ${blue}Clean Utility:${white}
4343 run ${red} clean${white} ${yellow} :${white} removes debug folder, executables and temp files
4444
4545${blue} Miscellaneous:${white}
46- run [${red} --list-langs${white} /${red} ll${white} ] ${yellow} :${white} lists all languages supported by current version of code-runner
47- run [${red} --version${white} /${red} v${white} ] ${yellow} :${white} echoes the current version of code-runner"
46+ run [${red} --list-langs${white} /${red} - ll${white} ] ${yellow} :${white} lists all languages supported by current version of code-runner
47+ run [${red} --version${white} /${red} - v${white} ] ${yellow} :${white} echoes the current version of code-runner"
4848
4949_ERROR_UFTC_ () {
5050 echo " ${red} ERROR: ${white} This file type can't be compiled or the file does not exist!"
@@ -83,7 +83,6 @@ clean() {
8383run () {
8484
8585 set -m
86- default_debugger
8786
8887 CFLAGS=" -Wall"
8988 if [[ $DEBUG == true ]]; then
@@ -93,35 +92,29 @@ run() {
9392 fi
9493
9594 if [[ ${FILE#* .} == c ]]; then
95+ default_debugger
9696 " ${CC:= gcc} " ${CFLAGS} " $FILE " -o " ${FILE%% .* } .out"
9797 if [[ $DEBUG == true ]]; then
9898 " $debugger " " ${FILE%% .* } .out"
99- if [[ $PERSISTENT != true ]]; then
100- rm -rf ./" ${FILE%% .* } .out.dSYM"
101- fi
102- else
103- if [[ $COMPILE != true ]]; then
104- ./" ${FILE%% .* } .out"
105- fi
99+ elif [[ $COMPILE != true ]]; then
100+ ./" ${FILE%% .* } .out"
106101 fi
107102 if [[ $PERSISTENT != true ]]; then
108103 rm -rf ./" ${FILE%% .* } .out"
104+ rm -rf ./" ${FILE%% .* } .out.dSYM"
109105 fi
110106
111107 elif [[ ${FILE#* .} == cpp ]]; then
108+ default_debugger
112109 " ${CXX:= g++} " ${CFLAGS} " $FILE " -o " ${FILE%% .* } .out"
113110 if [[ $DEBUG == true ]]; then
114111 " $debugger " " ${FILE%% .* } .out"
115- if [[ $PERSISTENT != true ]]; then
116- rm -rf ./" ${FILE%% .* } .out.dSYM"
117- fi
118- else
119- if [[ $COMPILE != true ]]; then
120- ./" ${FILE%% .* } .out"
121- fi
112+ elif [[ $COMPILE != true ]]; then
113+ ./" ${FILE%% .* } .out"
122114 fi
123115 if [[ $PERSISTENT != true ]]; then
124116 rm -rf ./" ${FILE%% .* } .out"
117+ rm -rf ./" ${FILE%% .* } .out.dSYM"
125118 fi
126119
127120 elif [[ ${FILE#* .} == py ]]; then
@@ -222,7 +215,6 @@ run() {
222215 runghc " $FILE "
223216 fi
224217
225-
226218 else
227219 _ERROR_UFTC_
228220 _EXIT_
@@ -326,7 +318,7 @@ for arg in "$@"; do
326318 " rcexe" )
327319 rclean_exe
328320 ;;
329- " --version" | " v" )
321+ " --version" | " - v" )
330322 echo " ${cyan} code-runner ${white} version : ${yellow} 1.2.0${white} "
331323 ;;
332324 * )
0 commit comments