1
1
mirror of https://github.com/chubin/cheat.sh.git synced 2024-12-24 20:46:09 +03:00
the only cheat sheet you need
Go to file
2017-05-29 19:34:35 +00:00
bin queries logging, github buttons, ?T and ?q 2017-05-26 09:17:39 +00:00
lib do not show :first page in the search results (fixes #6) 2017-05-29 10:35:54 +00:00
share added share/styles-demo.txt 2017-05-29 19:34:35 +00:00
LICENSE Initial commit 2017-05-07 23:40:57 +02:00
README.md Added cheat.sh usage example gif 2017-05-24 22:40:48 +02:00
requirements.txt added requirements.txt 2017-05-08 21:18:48 +00:00


          oooo                                .                oooo        
          `888                              .o8                `888        
 .ooooo.   888 .oo.    .ooooo.   .oooo.   .o888oo      .oooo.o  888 .oo.   
d88' `"Y8  888P"Y88b  d88' `88b `P  )88b    888       d88(  "8  888P"Y88b  
888        888   888  888ooo888  .oP"888    888       `"Y88b.   888   888  
888   .o8  888   888  888    .o d8(  888    888 . .o. o.  )88b  888   888  
`Y8bod8P' o888o o888o `Y8bod8P' `Y888""8o   "888" Y8P 8""888P' o888o o888o 


cheat.sh usage

Features

  • simple curl/browser interface
  • available everywhere, no installation needed
  • tab completion
  • search on a cheat sheet and in all cheat sheets
  • syntax highlighting
  • uses community driven cheat sheets repositories

Usage examples:

    $ curl cheat.sh/rsync
    $ curl cheat.sh/btrfs~volume
    $ curl cheat.sh/~snapshot
    $ curl cheat.sh/scala/Functions
    $ curl cheat.sh/scala/Functions~map

Options

    T                   omit terminal sequences (no colors; can be pasted in an editor)

Special URLs

Special URLs:

    /:help             # show help page
    /:post             # how to post new cheat sheets
    /:list             # list all known cheat sheets

Tab completion

    $ curl cheat.sh/:bash_completion > ~/.bash.d/cheat.sh
    $ . ~/.bash.d/cheat.sh
    $ # add . ~/.bash.d/cheat.sh to ~/.bashrc

To search for a keyword, use the query:

    /~keyword

In this case search is not recursive — it is conducted only in a pages of the specified level. For example:

    /~snapshot          look for snapshot in the first level cheat sheets 
    /scala/~currying     look for currying in scala cheat sheets

For a recursive search in all cheat sheets, use double slash:

    /~snapshot/r         look for snapshot in all cheat sheets

You can use special search options after the closing slash:

    /~shot/bi           case insensitive (i), word boundaries (b)

List of search options:

    i   case insensitive search
    b   word boundaries
    r   recursive search

Cheat sheets sources

cheat.sh uses several community driven repositories of cheat sheets:

External repositories:

How to add a cheat sheet

If you want to add a cheat sheet, you have one of the following ways:

  • Add it to one of the external cheat sheets repositories; you should decide on your own what is the best repository for your cheat sheet;
  • Add it to the local cheat.sh repository (cheat.sheets) on github (fork, commit, pull request);
  • Post it on cheat.sh using curl or a web browser (cheat.sh/:post).

If you want to change an existing cheat sheet, you have to find the original repository (when you open a cheat sheet in a browser, you see the repository's github button in the bottom of the cheat sheet), the cheat sheet is coming from, and change it there. After some time the changes will be synchronized on cheat.sh.