cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.76k stars 176 forks source link

Add Windows and Powershell support #280

Closed jtschuster closed 7 months ago

jtschuster commented 1 year ago

This builds off of the PR @dmfay made a while back to use crossterm, adds workarounds for windows related to paths and the fake_typer, and a powershell init script. Behavior should be identical as far as I can tell, but I may have missed something.

Replaces relative-path with path-absolutize.

cantino commented 1 year ago

Thank you for working on this @jtschuster!

Is there anyone who uses Powershell who could test this?

jtschuster commented 1 year ago

FWIW I've been using this personally for the past few months and haven't really hit issues (though I didn't have any baseline usage on Linux or Mac with the original version)

cantino commented 1 year ago

Is this ready?

jtschuster commented 1 year ago

Not quite, there are still some scenarios with multiline commands that don't work yet.

jtschuster commented 9 months ago

@cantino this is finally ready

cantino commented 7 months ago

Merged, thank you for this contribution @jtschuster!

cantino commented 7 months ago

Released, do you mind testing it? You may want to build master and make sure my change of

 [target.'cfg(windows)'.dependencies]
-autopilot = {git="https://github.com/autopilot-rs/autopilot-rs"}
+autopilot = "0.4.0"

works okay.

jtschuster commented 7 months ago

Released, do you mind testing it? You may want to build master and make sure my change of


 [target.'cfg(windows)'.dependencies]

-autopilot = {git="https://github.com/autopilot-rs/autopilot-rs"}

+autopilot = "0.4.0"

works okay.

I'll have to double check but IIRC autopilot panicked in the code mcfly uses, so I had to fix it upstream, but it hasn't been released.

cantino commented 7 months ago

cargo publish wouldn't work with a git dependency, it only supports versioned dependencies unfortunately.

On Sun, Dec 3, 2023 at 3:12 PM Jackson Schuster @.***> wrote:

Released, do you mind testing it? You may want to build master and make sure my change of

[target.'cfg(windows)'.dependencies] -autopilot = {git="https://github.com/autopilot-rs/autopilot-rs"} +autopilot = "0.4.0"

works okay.

I'll have to double check but IIRC autopilot panicked in the code mcfly uses, so I had to fix it upstream, but it hasn't been released.

— Reply to this email directly, view it on GitHub https://github.com/cantino/mcfly/pull/280#issuecomment-1837632278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUO64VRQADKFSBV7TVQYLYHUBMPAVCNFSM6AAAAAAQEO2SR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGYZTEMRXHA . You are receiving this because you modified the open/close state.Message ID: @.***>

jtschuster commented 7 months ago

cargo publish wouldn't work with a git dependency, it only supports versioned dependencies unfortunately.

Ah, okay. It does work with the powershell init script since that uses a file output by default, but it does require the file. We could just remove the dependency and require -o on windows, or copy the necessary source from autopilot. I think it would be a fairly thin slice to get just windows typing capability. I'm not sure autopilot is being actively maintained.

cantino commented 7 months ago

I don't have a Windows setup to test building so whichever you think is best is fine.

Also, are the builds that GitHub is making sufficient for Windows users?

jtschuster commented 7 months ago

I don't see any windows builds on the releases page, should I be looking somewhere else? My local build of main is working on my machine, though.

cantino commented 7 months ago

@praveenperera do you know how to enable windows builds?

cantino commented 2 months ago

Could we add usage instructions to the README @jtschuster? https://github.com/cantino/mcfly/issues/400