File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function _spinner() {
3939 # calculate the column where spinner and status msg will be displayed
4040 let column=$( tput cols) -${# 2} -8
4141 # display message and position the cursor in $column column
42- echo -ne ${2}
42+ printf " ${2} "
4343 printf " %${column} s"
4444
4545 # start spinner
@@ -55,23 +55,23 @@ function _spinner() {
5555 ;;
5656 stop)
5757 if [[ -z ${3} ]]; then
58- echo " spinner is not running.."
58+ printf " spinner is not running..\n "
5959 exit 1
6060 fi
6161
6262 kill $3 > /dev/null 2>&1
6363
6464 # inform the user uppon success or failure
65- echo -en " \b["
65+ printf " \b["
6666 if [[ $2 -eq 0 ]]; then
67- echo -en " ${green}${on_success}${nc} "
67+ printf " ${green}${on_success}${nc} "
6868 else
69- echo -en " ${red}${on_fail}${nc} "
69+ printf " ${red}${on_fail}${nc} "
7070 fi
71- echo -e " ] "
71+ printf " ]\n "
7272 ;;
7373 * )
74- echo " invalid argument, try {start/stop}"
74+ printf " invalid argument, try {start/stop}\n "
7575 exit 1
7676 ;;
7777 esac
You can’t perform that action at this time.
0 commit comments