Skip to content
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

Add support for Windows #2

Open
TwoCarPongPong opened this issue Jan 5, 2024 · 22 comments
Open

Add support for Windows #2

TwoCarPongPong opened this issue Jan 5, 2024 · 22 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@TwoCarPongPong
Copy link

No description provided.

@YiNNx YiNNx added the enhancement New feature or request label Jan 5, 2024
@YiNNx
Copy link
Owner

YiNNx commented Jan 5, 2024

The reason is that cmd-wrapped hasn't been tested on Windows, and there might be potential bugs when used in a non-Unix environment.

Could you please try testing this package to see if it works on Windows?

cmd-wrapped-windows-x86_64.zip

@TwoCarPongPong
Copy link
Author

thanks but it don't works

@TwoCarPongPong
Copy link
Author

1704440114466

@YiNNx
Copy link
Owner

YiNNx commented Jan 5, 2024

what's the result of echo $SHELL in the terminal?

@TwoCarPongPong
Copy link
Author

it is $SHELL

@TwoCarPongPong

This comment was marked as off-topic.

@YiNNx

This comment was marked as off-topic.

@YiNNx

This comment was marked as off-topic.

@YiNNx
Copy link
Owner

YiNNx commented Jan 5, 2024

I attempted to run it in the git bash on Windows, but it can’t work directly. (Windows' SHELL path is differently recorded from Unix) Maybe need to add some additional compatibility code for it later.

image

@YiNNx YiNNx changed the title Why No Windows Add support for Windows Jan 5, 2024
@TwoCarPongPong

This comment was marked as off-topic.

@artiga033
Copy link

FYI cmd.exe and PowerShell (including the Core one which is cross-plat) does not record command execution time. PowerShell does record execution start and even ending timestamp but they are lost once session closed, leaving only command line without any metadata stored on disk.

PowerShell/PSReadLine#1886 is expected to solve this, but still undergoing.

I myself use PowerShell a lot, but I don't think it's able to add support for it unless PowerShell itself introduced the change.

@YiNNx
Copy link
Owner

YiNNx commented Jan 6, 2024

@artiga033 Got it. Maybe we could consider adding support for bash or zsh on Windows? I rarely use the terminal in Windows, so I'm not sure about the solutions for using zsh/bash on Windows, and how to appropriately adapt it.

@YiNNx YiNNx added the help wanted Extra attention is needed label Jan 6, 2024
@blue-duty
Copy link

Windows上的最佳终端我觉得应该是powershell

@TwoCarPongPong
Copy link
Author

Windows上的最佳终端我觉得应该是powershell

poweshell执行当前目录脚本要加.\

@blue-duty
Copy link

Windows上的最佳终端我觉得应该是powershell

poweshell执行当前目录脚本要加.\

加上自动补全的话我觉得还好,主要是对于Linux的基础命令支持不错,迁移体验好

@TwoCarPongPong

This comment was marked as off-topic.

@blue-duty

This comment was marked as off-topic.

@Memories-Apart
Copy link

I attempted to run it in the git bash on Windows, but it can’t work directly. (Windows' SHELL path is differently recorded from Unix) Maybe need to add some additional compatibility code for it later.

image

I can run it by using "cmd-wrapped 2024 -s bash" in git bash. But the output is 0.
image
image

@YiNNx
Copy link
Owner

YiNNx commented Jan 21, 2024

But the output is 0.

@Memories-Apart The reason may be the same as #3 (comment)

@colommar
Copy link

Windows上直接使用命令行的情况比较少,一般都是用ide内的,请问下这种有方法可以检测吗?

@Borber
Copy link

Borber commented May 1, 2024

Still waiting for windows support, currently using pwsh 7

@AXiX-official
Copy link

AXiX-official commented Oct 15, 2024

FYI cmd.exe and PowerShell (including the Core one which is cross-plat) does not record command execution time. PowerShell does record execution start and even ending timestamp but they are lost once session closed, leaving only command line without any metadata stored on disk.

PowerShell/PSReadLine#1886 is expected to solve this, but still undergoing.

I myself use PowerShell a lot, but I don't think it's able to add support for it unless PowerShell itself introduced the change.

for PowerShell Start-Transcript may helps, just add it to user's profile and parse cmd history from that file
with -IncludeInvocationHeader arg it stores time stamp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants