I'm starting to write a script that is solely a file manager, and I am setting a function asking the user to set their preferred text editor, and it always ends with an error message: 

```
/home/user/bin/manager: line 12: syntax error near expected token 'fi'
/home/user/bin/manager: line 12: 'fi'

```

This is the code:

```
#!bash/bin
#File managing shell
editor() {
read -p "What file editor would you like to use?    (Nano)  or  (Vi)m   " answer
export $answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]')
if [ [ "$answer" -eq "nano" && "vi" && "vim" && "emacs" ] ]
then
editor="$answer"
else
echo "This is embarassing, I didn't understand your input..."
editor ()
fi
}
echo -e "" #this area tells the user he commands and etc. it takes forever to type...
sleep 1
editor()

```

Is there anything I'm missing?

Thanks