If you want iex to ONLYonly work in one directory and NEVERnever anywhere else try this:
alias iex='[ $(pwd) = /path/to/special/dir ] && iex –S mix'
If you want iex to work differently in other directories try it like this:
alias iex='[ $(pwd) = /path/to/special/dir ] && iex –S mix || iex'