Can macOS open command open files in the project associated with the window it was executed from?

If I have two or more projects open in different RStudio windows, and I in the terminal bar I use the open macOS command to open a file, the file opens in whatever project was opened first rather than the project associated with the terminal window where I executed the open command. Is there a way to have the file open in the project associated with the RStudio window from which it is executed? If possible, I want to behavior to be the same as when I click on file in the Files tab.

Thanks in advance for any help.

I see this too in macOS—terminal windows in separate systems synch state. Not only will this happen when opening a new session (opens in the same project as the existing session), but changing project in one directory so that the current directory changes in one terminal will change it in the terminal in the other session. Nor does adding terminal sessions avoid the problems. This doesn't happen in Ubuntu.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.