OSDN Git Service

[fix] : Fixed message argumentt parser
authorhayao <shun819.mail@gmail.com>
Mon, 28 Dec 2020 10:54:53 +0000 (19:54 +0900)
committerhayao <shun819.mail@gmail.com>
Mon, 28 Dec 2020 10:54:53 +0000 (19:54 +0900)
tools/msg.sh

index 090bec7..8a8c3cc 100755 (executable)
@@ -54,10 +54,10 @@ msg_error() {
 
 
 # Parse options
-ARGUMENT="${@}"
+ARGUMENT="${*}"
 _opt_short="a:c:l:no:r:s:xh"
 _opt_long="nocolor,bash-debug,help,nolabel,noappname,noadjust"
-OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- ${ARGUMENT})
+OPT=$(getopt -uo ${_opt_short} -l ${_opt_long} -- "${ARGUMENT}")
 [[ ${?} != 0 ]] && exit 1
 
 eval set -- "${OPT}"