cheat命令

1. cheat命令

cheat命令怎么安装和使用

1
brew install cheat

cheat命令简单来说,就是告诉你一个命令如何使用。它没有提供其他额外多余的信息,只通过使用实例告诉你一个命令如何使用。

1.1. 查看哪些命令可以用cheat

1
cheat -l | less

1.2. 输出颜色高亮

编辑配置文件: .config/cheat/conf.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# conf.yml:
# ...

# Should 'cheat' always colorize output?
colorize: true

# Which 'chroma' colorscheme should be applied to the output?
# Options are available here:
# https://github.com/alecthomas/chroma/tree/master/styles
# style: monokai

style: solarized-dark

# Which 'chroma' "formatter" should be applied?
# One of: "terminal", "terminal256", "terminal16m"
formatter: terminal256


cheatpaths:
- name: github # a name for the cheatpath
path: ~/cheat_files/awesome-cheatsheets # the path's location on the filesystem
tags: [ github ] # these tags will be applied to all sheets on the path
readonly: true # if true, `cheat` will not create new cheatsheets here

- name: dev # a name for the cheatpath
path: ~/cheat_files/cheatsheets # the path's location on the filesystem
tags: [ dev ] # these tags will be applied to all sheets on the path
readonly: true # if true, `cheat` will not create new cheatsheets here


# - name: personal
# path: ~/documents/cheat/personal # this is a separate directory and repository than above
# tags: [ personal ]
# readonly: false # new sheets may be written here
# ...

1.3. 带tags 查询cheat

1
2
3
4
5
cheat -l -t github  # 带tag查询

cheat -l -t dev # 带tag查询

cheat -l |grep html # 过滤查询

-------------本文结束感谢您的阅读-------------