chubin / cheat.sh

the only cheat sheet you need
https://cheat.sh/
MIT License
38.15k stars 1.78k forks source link

Offline usage for Windows (and also online usage) #272

Open ndavd opened 3 years ago

ndavd commented 3 years ago

Continued discussion from https://github.com/chubin/cheat.sh/issues/14

Make cht.sh usable on Windows (offline as well). Maybe create a separate cht.bat since Windows uses batch and not shell

abitrolly commented 3 years ago

It will be easier to rewrite cht.sh in Python and call that instead.

ndavd commented 3 years ago

Yeah or that

ndavd commented 3 years ago

@chubin you told me to remove pyICU from requirements.txt. How exactly do I do that. It has to be done from the repository right? Because it clones the repo and installs the requirements automatically

abitrolly commented 3 years ago

Who clones the repo?

ndavd commented 3 years ago

Doing cht.sh --standalone-install

chubin commented 3 years ago

The problem with windows batch scripts, that they are not so functional as shell scripts, and in my opinion on the following should be taken in the longrun:

  1. Rewirte cht.sh in python, and make it available for pip, so that the installation will look like:
    pip install cht
    cht --standalone-install

    Maybe should be done anyway, not only for Windows. Disadvantage: one still need Python on Windows which is not default anyway

2 Rewrite cht.sh in Go, and make it available as a binary on github, so that the installation will look like file dowload.

  1. Rewrite cht.sh in PowerShell; not really ueful for all platforms except windows, but potentially could be more interesting (better integration etc) for Windows.

I personally tend to (1).

pyICU

I will disable it by default

ndavd commented 3 years ago

@chubin personally I love the idea of 1. It's simpler. I mean a small requirement like installing python isn't a big deal, it usually comes by default in Linux, as for Windows users this current way one would need curl (which is not default) and bash (not default as well). Python is very easy to install.

God-damnit-all commented 2 years ago
  1. Rewrite cht.sh in PowerShell; not really ueful for all platforms except windows, but potentially could be more interesting (better integration etc) for Windows.

The cross-platform version of PowerShell is grossly underestimated. Having an object-based command-line is very useful.

Considering Linux already has the bash script and PowerShell can do everything the bash script does, I think this is the best option.

aniketgm commented 1 year ago

Considering Linux already has the bash script and PowerShell can do everything the bash script does, I think this is the best option.

@ImportTaste I agree, we need a powershell equivalent something like -- cht.ps1.

  1. Rewrite cht.sh in PowerShell; not really ueful for all platforms except windows, but potentially could be more interesting (better integration etc) for Windows.

@chubin Well, that's a valid point that it's for only for windows. However, unfortunately, there are still more windows user out there than linux.

evrial commented 11 months ago

pyICU I will disable it by default

Hello from Q4 2023, still enabled and causes trouble