replace [ by [[; closes #29
refactoring some if statements to reduce indent-number
expect eof instead interact in auto_scp to be more silent