How to run `code .` and `yarn start` on macOS?
-
I tried using .sh file
I was able to use commands like
open .
before somecd
but I wasn't able to run complex commands likecode
to open vs on that folder(this one i can solve usingopen -a code filePath
. but start my project prove to be harder.Outside trigger, the sh file work. Just on trigger I wasn't able to run it
-
So, I got it haha
#/bin/bash newtab(){ osascript \ -e 'tell application "iTerm2" to tell current window to set newWindow to (create tab with default profile)' \ -e "tell application \"iTerm2\" to tell current session of newWindow to write text \"${@}\"" } newtab 'cd ~/dev/clubpetro-frontend && code . && yarn run start'
This is the .sh file that I create, all I do is call
bash ~/dev/alexa/teste.sh
on trigger working perfectly -
@Paulo-Eduardo, awesome. Nice job. I'm glad you got it working.