Closed IgorMuzyka closed 6 years ago
I don’t think that is possible. I’ve never seen a shell script in any language change the directory of the calling terminal session.
For more info see https://stackoverflow.com/questions/255414/why-doesnt-cd-work-in-a-shell-script
Note that the “source” solution mentioned there only works with bash scripts (or whatever interpreter you’re using).
- aug. 2018 kl. 17:19 skrev Igor Muzyka notifications@github.com:
Hey, i get that i should use main.currentdirectory instead of run("pwd") but how do i change the current directory so that when my terminal app is exited the user will end up in a place he selected from inside the app?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
That's a pity 😕
How can I go to the parent directory?
main.currentdirectory = "New" will be going child dir
You need to give the full path of the directory, beginning with ‘/‘. “New” refers to a child directory because it does not start with a ‘/‘.
Hey, i get that i should use
main.currentdirectory
instead ofrun("pwd")
but how do i change the current directory so that when my terminal app is exited the user will end up in a place he selected from inside the app?