Skip to content

tpanj/cht.exe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utillity to gain help, working examples about various commands, APIs, ... Unified access to the best community driven documentation repositories of the world

The only cheat sheet you need

Look in https://github.com/chubin/cheat.sh for more info.

See Motivation for reasons this software esists.

Installation

Just copy downloaded cht.exe to some of your %PATH% dir to use it from every console.

e.g.: copy cht.exe c:\windows\system32 (but you need privileges)

or use scoop command-line installer for Windows to do it automatically:

scoop install cht

Usage

Info about shutdown command

cht shutdown

Info about shutdown command

Reversing string in c, second alternative

cht c/reverse/2

Reversing string in c, second alternative

Options

Similar as on obove pic; showing first alternative but now with -Q (or longer variant --query) which switches on query mode - space delimetered arguments are parts of query.

cht -Q c check file exsists /1

Get version info with -v (or longer variant --version) switch and config file location (if you do not where to store it). Currently only server can be defined there. Example of file:

CHTSH_URL="http://cht.sh" # since https:// protocol is not yet supported, default server
#CHTSH_URL=http://secret.my #my own server

add -T (or longer variant --no_colors) parameter not to use coloring at all

cht c/strcpy -T

Disabling coloring of saved files localy

cht file:///tmp/saved_file -T

Removing colors

Compiling

Use vlang

Windows

v src -o cht.exe

Linux

Simplest & quickest

sudo apt install build-essential libcurl4-openssl-dev
v src -o cht
sudo cp ./cht /usr/local/bin/ # "install" it

External sources


TODO:

  • Config file

Deprecated:

  • windows compile instructions here
  • complete cmake
  • compile with openssl → postponed since this is not needed for now
  • complete functionallity all features of the cht.sh command line
  • sorry Mac users, only tasted on Linux and winXP-10