codeapp
codeapp copied to clipboard
(Improvement) Terminal pwd does not change upon open folder
While it may be useful, to have the terminal stay where it was before, I would at least like to have the option to change the terminal-directory upon opening or changing the workspace.
I would add a switch in the settings to allow „Automatically switch terminal working directory“ when opening a folder.
This is probably a regression. I'll see what caused it.
I actually can't reproduce this issue on my device. Which device are you using and what is the iOS version of it?
Well, as it seems it does "change" it, but upon running clang++ it went back to the previous folder. 
As you can see, the folder is called "Test" and while the Terminal has been changed to the Test folder, and after running the command it changed to the previous one. I can only assume that any command will invoke this behaviour.
I have tested it again, and it seems like it reverts to whatever last project folder is, or in which folder the last successfull executed command was. (no error return value)
This is a video demonstrating the point further:
https://user-images.githubusercontent.com/46635221/164999699-edf1f799-3738-4717-8012-43c093674727.MOV
I think it matters that the clang command failed, otherwise It would stay in the directory of the project. After running help, it reverted back upon a error code:

EDIT:
I also uses ls for showing files. The Terminal actually is in the project directory, it really switches and is not just a visual bug or similar when seeing the project names folder inside the terminal. You can interact with the project folder in any way possible.