一般我们要记住很多的shell 命令
但是呢? 好多都记不住,而且命令还上还要加 各种的参数
man命令?
看起来一脸懵逼?还是不知道怎么用?
让我给你介绍下 tldr 命令
例如我想查询 curl 的用法
☁ ~ tldr curl
1
2
|
&
#x2601; ~ tldr curl
|
怎么样 查询结果一目了然
☁ ~ tldr -h usage: tldr [-h] [-u] [-o {linux,osx,sunos}] [-s SOURCE] [-c] Python command line client for tldr optional arguments: -h, --help show this help message and exit -u, --update_cache Update the cached commands -o {linux,osx,sunos}, --os {linux,osx,sunos} Override the operating system [linux, osx, sunos] -s SOURCE, --source SOURCE Override the default page source -c, --color Override color stripping ☁ ~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
&
#x2601; ~ tldr -h
usage
:
tldr
[
-
h
]
[
-
u
]
[
-
o
{
linux
,
osx
,
sunos
}
]
[
-
s
SOURCE
]
[
-
c
]
Python
command
line
client
for
tldr
optional
arguments
:
-
h
,
--
help
show
this
help
message
and
exit
-
u
,
--
update_cache
Update
the
cached
commands
-
o
{
linux
,
osx
,
sunos
}
,
--
os
{
linux
,
osx
,
sunos
}
Override
the
operating
system
[
linux
,
osx
,
sunos
]
-
s
SOURCE
,
--
source
SOURCE
Override
the
default
page
source
-
c
,
--
color
Override
color
stripping
&
#x2601; ~
|
如何安装呢?
tldr有很多种语言版本,安装也很简单,各种包管理工具都支持。
安装方式如下
C++ client
$ brew install tldr-pages/tldr/tldr
1
2
|
$
brew
install
tldr
-
pages
/
tldr
/
tldr
|
Crystal client
$ brew install porras/tap/tlcr
1
2
|
$
brew
install
porras
/
tap
/
tlcr
|
Go client
$ go get github.com/pranavraja/tldr (or platform binaries)
1
2
|
$
go
get
github
.
com
/
pranavraja
/
tldr
(
or
platform
binaries
)
|
Node.js client
$ npm install -g tldr
1
2
|
$
npm
install
-
g
tldr
|
Perl5 client
$ cpanm App::tldr
1
2
|
$
cpanm
App
::
tldr
|
Python clients
tldr-python-client
$ pip install tldr
1
2
|
$
pip
install
tldr
|
tldr.py
$ pip install tldr.py
1
2
|
$
pip
install
tldr
.
py
|
Ruby client
$ gem install tldrb
1
2
|
$
gem
install
tldrb
|
Bash client
https://github.com/raylee/tldr
1
2
|
https
:
/
/
github
.
com
/
raylee
/
tldr
|
Web client
https://ostera.github.io/tldr.jsx
1
2
|
https
:
/
/
ostera
.
github
.
io
/
tldr
.
jsx
|