nmatt commented on issue #8990: URL: https://github.com/apache/netbeans/issues/8990#issuecomment-3499986030
> > Note that "Open in Terminal" only exists for project nodes > > any folder can be opened, the actions move into the `Tools` sub-menu of the context menu. > > There is no link to the project, all it does is to initialize the terminal with a path. Ah, thanks for pointing that out, I hadn't thought of looking into submenus; Previously I had wondered why the option isn't available on arbitrary directories. So the connection is to the directory that was opened in the terminal. Nevertheless, the menu item is prominent for projects. My main use case for the terminal is for Git commands, so the connection to the project (local git repo and workdir) is more salient. Regarding pinning, for my usage this has the drawback that when switching projects, I would have to both unpin _and_ exit the terminal window, where previously I would only have to exit the terminal., Exiting/closing a pinned window doesn't unpin it, hence it would reappear after a restart, in addition to the new terminal I would have opened for the project I switched to. I'd like to proposer the following alternative, and I would also be inclined to implement it myself if that helps: When a terminal is opened in a specific directory (in particular via "Open in Terminal"), remember the directory it was opened in. When that terminal is auto-reopened after a restart, reopen it with the remembered directory. But do not auto-pin it, so that when it is manually exited/closed, a later restart will not reopen it. A second, independent feature could be that when such a terminal is pinned, the "Directory" field in the "Pin Tab" dialog would be pre-filled with the remembered directory. > The default terminal is opening in the installation directory on Windows? I took a closer look at that, and it seems that the terminal process simply inherits the current working directory from its parent, i.e. from the main NetBeans process. The NetBeans Windows installer always set the working directory to the installation directory in the NetBeans start menu shortcut. After the installer was recently discontinued, I just kept this the same for new installations. So the default working directory for a new terminal is just whatever working directory NetBeans was started with. If you double-click on the NetBeans executable in Windows Explorer, it would be the _bin_ directory that contains it. On Unix the current working directory is maybe typically _$HOME_ instead for the main NetBeans process. So I wouldn't say that the behavior is wrong here. If someone starts NetBeans with a specific current working directory, it would be plausible for them to expect terminals to open in that same directory by default. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
