YiNNx / cmd-wrapped

👩‍💻 A CLI Tool for Command Line Insights
https://crates.io/crates/cmd-wrapped
MIT License
1.01k stars 27 forks source link

Add support for Windows #2

Open TwoCarPongPong opened 10 months ago

YiNNx commented 10 months ago

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 commented 10 months ago

thanks but it don't works

TwoCarPongPong commented 10 months ago
1704440114466
YiNNx commented 10 months ago

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

TwoCarPongPong commented 10 months ago

it is $SHELL

TwoCarPongPong commented 10 months ago

不对啊哥们儿 你是中国人

YiNNx commented 10 months ago

it is $SHELL

你是用的什么终端呢,PowerShell 吗

YiNNx commented 10 months ago

不对啊哥们儿 你是中国人

但我不是哥们🤣

YiNNx commented 10 months ago

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

TwoCarPongPong commented 10 months ago

好的妹妹 我用的就是cmd 套了WindowsTerminal的cmd

artiga033 commented 10 months ago

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 commented 10 months ago

@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.

blue-duty commented 10 months ago

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

TwoCarPongPong commented 10 months ago

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

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

blue-duty commented 10 months ago

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

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

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

TwoCarPongPong commented 10 months ago

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

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

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

你那个earth的定位怎么弄的bro

blue-duty commented 10 months ago

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

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

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

你那个earth的定位怎么弄的bro

手写哦哈哈哈哈哈哈哈

Memories-Apart commented 9 months ago

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 commented 9 months ago

But the output is 0.

@Memories-Apart The reason may be the same as https://github.com/YiNNx/cmd-wrapped/issues/3#issuecomment-1878238291

colommar commented 8 months ago

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

Borber commented 6 months ago

Still waiting for windows support, currently using pwsh 7

AXiX-official commented 2 weeks ago

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