question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to add a 'current working directory' event to the public API in a reliable way?

See original GitHub issue

I’m wondering if it would be possible to add an event to the public API (like the title event, for instance) so that the current working directory was always passed to that event on every cd change.

Is it possible to implement such a feature in a reliable way that it doesn’t matter if you’re using Bash, Zsh or any other shell?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Tyriarcommented, May 25, 2018

@rfgamaral yeah windows/WSL is different, the right place for this request is https://github.com/Microsoft/node-pty but there isn’t really any way of doing it there either that I know of.

0reactions
rfgamaralcommented, May 25, 2018

@Tyriar The problem is that that doesn’t work under WSL because lsof is running on the context of the OS running Hyper, meaning Windows.

I have a found a workaround to find the cwd when running under WSL which uses lsof too but runs with bash -ic "cmd" and it’s a bit slower. Not to mention that the workaround itself is probably around 90% reliable, there might be some edge cases where it fails.

That’s why I was looking for a better way, something implemented directly on xterm.js, but I guess that ain’t possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you get the current project directory from C# code ...
IO; // This will get the current WORKING directory (i.e. \bin\Debug) string ... Add a pre-build event command line (Visual Studio: Project properties ......
Read more >
Using Service Workers - Web APIs | MDN
Installation takes place. An install event is always the first one sent to a service worker (this can be used to start the...
Read more >
Zalando RESTful API and Event Guidelines
We apply the RESTful web service principles to all kind of application (micro-) service components, independently from whether they provide functionality via ...
Read more >
How to Version a REST API - freeCodeCamp
Add new properties/endpoints rather than changing existing ones; Thoughtfully sunset obsolete properties/endpoints. Here's an example that ...
Read more >
Complete basic operations using SharePoint REST endpoints
Complete basic operations using SharePoint REST endpoints · Setting WebTemplate to 'sts' will create a modern homepage. · Cloud-hosted add-in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found