Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Not working on windows #38

Closed
apopek opened this issue Feb 19, 2017 · 17 comments
Closed

Not working on windows #38

apopek opened this issue Feb 19, 2017 · 17 comments

Comments

@apopek
Copy link

apopek commented Feb 19, 2017

I'm working on Windows 8.1
I'm in directory with github .git folder and nothing showing, no error messages in console

Hyper 1.2.1

windows

@henrikruscon
Copy link
Owner

Sorry doesn't currently support Windows. Hyper 1.2.0 was expected to bring Windows support by setting CWD but it doesn't. There's still no efficient & consistent method to fetch CWD on Windows.

@apopek
Copy link
Author

apopek commented Feb 20, 2017

So please add this information in README.md that windows is not supported, thanks.

@henrikruscon
Copy link
Owner

I'll look into adding it to Hyper myself through a PR ✌️

I'll leave this open until I either found a solution or added a disclaimer in readme.

@jnsn
Copy link

jnsn commented Mar 8, 2017

According to vercel/hyper#1412, the "cwd" was added to the redux session, on the 15th of January.

My guess is that it's available in current releases then?

@henrikruscon
Copy link
Owner

henrikruscon commented Mar 8, 2017

@jnsn Sadly it doesn't do anything. Confirmed in the commit: vercel/hyper@232295a

I'm still looking to PR this myself but I've been really busy with work lately.

@postromantic
Copy link

lsof -p {pid} can be replaced with handle -p {pid} for windows.
But there is a bug in Hyper: pid is always incorrect on windows. It's node-pty issue: microsoft/node-pty#67

Stanzilla added a commit to Stanzilla/hyper that referenced this issue May 15, 2017
Stanzilla added a commit to Stanzilla/hyper that referenced this issue May 15, 2017
rauchg pushed a commit to vercel/hyper that referenced this issue May 16, 2017
@Stanzilla
Copy link

Stanzilla commented May 16, 2017

@postromantic Hyper is now on 0.6.4 of node-pty. handle is a Sysinternals tool and does not come with Windows, so not sure that helps? If yes, how would you use it?

@henrikdahl If you still want to implement it in Hyper, I think this is a good start vercel/hyper#1357 (comment)

@postromantic
Copy link

@Stanzilla, thanks. i've tried to use handle with latest version, but it's not as good as i expected.
The issues are:

  1. handle returns multiple file handles. for bash it's ok (cause cwd is always first handle), but for cmd it's random file handles so no way to pick the right one. powershell doesn't expose cwd as file handle at all
  2. bash on windows usually run with parent process (for instance, i'm using git-cmd.exe --command=/usr/bin/bash.exe) so you have to lookup for a child pid. it's quite easy, but very slow: wmic process where (ParentProcessId=${pid}) get ProcessId

So it doesn't work well. The right way is to track cwd in wintpy, similar to ConEmu/ConsoleZ.

I'm using another approach now: set bash prompt to show cwd in title and subscribe to SESSION_SET_XTERM_TITLE event to set current cwd in the hyper-statusline. Hacky, but works well for me.

@Stanzilla
Copy link

@postromantic do you have the code for that somewhere?

@postromantic
Copy link

@Stanzilla sure
https://gist.github.com/postromantic/b0456349819aa3031992999137f42167
https://gist.github.com/postromantic/47017c4aebca98e4bfb24b65737de4ba

@Nicholaiii
Copy link

Waiting eagerly for this! hyper-statusline is so sexy, and I can get rid of cwd clutter in my terminal.

@dougd
Copy link

dougd commented May 28, 2017

I've submitted a PR for my attempt to fix the issue on Windows. It is not 100% perfect but works good enough for me (I'm on Windows 7) - and better than the existing solution which doesn't work on Windows at all :-)

jtrussell added a commit to jtrussell/hyper-statusline that referenced this issue May 30, 2017
Hi, I love this plugin but spent a bit of time scratching my head when I went to use it on my windows machine. It seems that this is currently expected to not work on windows (henrikruscon#38). Perhaps it would be appropriate to declare as much in the package.json so wayward windows users are alerted when they attempt to install?
tylerong pushed a commit to tylerong/hyper that referenced this issue Jul 3, 2017
@Pandawan
Copy link

Wait, can't you easily get the CWD with the chdir command?

@Stanzilla
Copy link

Stanzilla commented Jul 19, 2017

You can but good luck trying to use that in a script. Getting it into a variable is not trivial.

@Stanzilla
Copy link

Does this help? microsoft/node-pty@d33cc1c

@dougd
Copy link

dougd commented Sep 6, 2017

Looks promising - how do we get that available?

@henrikruscon
Copy link
Owner

In next release ✌️ #73

whitefog425dev added a commit to whitefog425dev/hyper that referenced this issue Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

8 participants