[bash] Extra tab opens

Hello everyone,

This code is working right using mate-terminal but with xfce4-terminal for some reason, it open up an extra tab...

Could someone please help me out to understand why this is happening?

#!/bin/bash

cd "$(dirname "$0")"/files

tab=" --tab"
title=" --title"

options=()

cmds[0]="./script1.sh"
cmds[1]="./script2.sh"
cmds[2]="./script3.sh"

tabName[0]="tab name 1"
tabName[1]="tab name 2"
tabName[2]="tab name 3"

for i in 0 1 2; do
	options+=($tab $title "${tabName}" -e "bash -c '${cmds} ; bash'" )
done
xfce4-terminal --geometry=102x9 "${options[@]}"	
exit 0

Try printf "[%s]\n" xfce4-terminal --geometry=102x9 "${options[@]}" to see exactly what options you're feeding in. Each option will be its own line, surrounded by [ ] .

I did has you suggested and I got the following:

[xfce4-terminal]
[--geometry=102x9]
[--tab]
[--title]
[tab name 1]
[-e]
[bash -c './script1.sh ; bash']
[--tab]
[--title]
[tab name 2]
[-e]
[bash -c './script2.sh ; bash']
[--tab]
[--title]
[tab name 3]
[-e]
[bash -c './script3.sh ; bash']