How to run `code .` and `yarn start` on macOS?
-
I tried using .sh file
I was able to use commands like
open .before somecdbut I wasn't able to run complex commands likecodeto 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.shon trigger
working perfectly -
@Paulo-Eduardo, awesome. Nice job. I'm glad you got it working.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login