-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to get the current path of pty #4
Comments
When you say “get this path” what do you mean? I suppose you could run ‘pwd’ In the terminal. |
thanks for your quick reply Let me put my question in a better context: When I type I have achieved this using xterm.js's
When user click say But the problem is the value of
I need the full path of the input data |
Ah I see. I don't think there is a way to do that as you described because bash is running as a subprocess, and only it knows which directory it's in (the pty doesn't even know what bash is doing or which directory the user navigated to, it's just running bash as a subprocess and waiting for it to exit. It could be running any other subprocess like zsh, gdb, python, cat, less, etc). I would suggest registering a link matcher on the full path rather than the filename. That way when the link matcher is triggered it's always to a full path and you can open it on the server in a more straightforward way. |
Thanks for your great work now I am trying to learn and build something cool based on your project.
And now I am facing a problem that I can not solve myself after doing a lot researches...
Let's say the starting path is
/User/Example/App
and then the command input sequence from web side is :
And now the current path should be at
/User
but how can I get this path using code ?Any advice will be appreciated, thanks :)
The text was updated successfully, but these errors were encountered: