Reset BROWSER in tmux environment
Avoid whichcraft
Use conventional syntax for if block
Quote expansions properly
Remove unneeded braces in expansion