0

I use the system/unix command on Matlab in order to run an external program via the command line. I want to execute it via an alias define in .zshrc on my computer. Unfortunately, the alias seems to be not available.

Example with ll

  • on a terminal: which ll gives ll: aliased to ls -lh
  • on Matlab: unix('ll') gives zsh:1: command not found: ll

I check if I used the right shell: unix('echo $SHELL') gives /usr/local/bin/zsh.

I have add setopt aliases in my .zshrc but it changes nothing. Is it possible to check which startup files is used when you open a non interactive shell?

Guuk
  • 505
  • 3
  • 17

1 Answers1

0

The ~/.zshrc seems to be not loaded in the non interactive case. The solution consists in loaded aliases and added setopt aliases in ~/.zshenv. See this for instance.

Guuk
  • 505
  • 3
  • 17