Commit c44acae5 authored by REAL's avatar REAL

fix -n output in showcmd output

parent 804cec9c
......@@ -515,6 +515,8 @@ showcmd()
SETCOLOR_SUCCESS
echo -n " \$"
for i in "$@" ; do
# hack against echo -n -n
[ "$i" = "-n" ] && echo -n " -n" && continue
# print with qoutes if args have spaces
echo -n " "
echo -n "$i" | sed -e "s|\(.* .*\)|'\1'|g"
......
......@@ -8,6 +8,12 @@ check()
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$2' do not match with '$3'" || echo "OK for '$1' with '$2'"
}
check_docmd()
{
check "$1" " \$ $1" "$(docmd $1 | head -n1)"
}
func()
{
docmd ls $@
......@@ -15,5 +21,10 @@ docmd ls "$@"
ls "$@"
}
func 1 "1 2"
func 1 2 3
#func 1 "1 2"
#func 1 2 3
TERMOUTPUT=
check_docmd "true false"
check_docmd "true -n"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment