Browse Source

Put \n at the end of format strings when `printf` is used as `echo`

Matteo Savatteri 3 years ago
parent
commit
43636a8197
1 changed files with 4 additions and 4 deletions
  1. 4 4
      vaporget

+ 4 - 4
vaporget

@@ -65,7 +65,7 @@ check_options()
 
 	if [ "${OPTIONS_STRING#*h}" != "$OPTIONS_STRING" ]
 	then
-		printf "$HELP_TEXT"
+		printf "$HELP_TEXT\n"
 		return 2
 	fi
 
@@ -77,7 +77,7 @@ check_options()
 
 	if [ "${OPTIONS_STRING#*V}" != "$OPTIONS_STRING" ]
 	then
-		printf "$VERSION_INFOTEXT"
+		printf "$VERSION_INFOTEXT\n"
 		return 2
 	fi
 
@@ -165,7 +165,7 @@ while getopts pdm:Vh f; do
 			MPV_CMDLINE=$(printf "${OPTARG}" | sed -e 's/[[:space:]]//g' -e 's/[^,]\{2,\}/--& /g' -e 's/\(^\|,\)[[:alnum:]]\($\|,\)/ -& /g' -e 's/,//g')
 		;;
 		\?)
-			printf "${USAGE}" >&2 && exit 1
+			printf "${USAGE}\n" >&2 && exit 1
 		;;
 	esac
 done
@@ -179,7 +179,7 @@ CHOICES=$(get_library "${WEBSITE}" | select_artist_list "${WEBSITE}")
 
 clear
 if [ -z "${CHOICES}" ]; then	# User didn't select any artist
-	printf "Please, select at least one artist." >&2
+	printf "Please, select at least one artist.\n" >&2
 	exit 1
 fi