0
votes

I just figured out how I can open a new terminal and immediately send it commands. The command I'm using on Linux Mint is "mate-terminal -x zsh -c '(stuff here) ; exec /bin/zsh". But, I hit a wall in regards to calling functions and aliases defined in my .zshrc file. Instead it says "zsh:1: command not found: ".

1

1 Answers

2
votes

.zshrc file is only used for interactive shells, http://linux.die.net/man/1/zsh

Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc

There is -i option ("Force shell to be interactive.") which may help you, try:

mate-terminal -x zsh -c '(stuff here) ; exec /bin/zsh -i'

or if you have zshrc commands in stuff:

mate-terminal -x zsh -ci '(stuff here) ; exec /bin/zsh -i'