2017-02-06 04:48:48 +01:00
|
|
|
# tldr-bash-client
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-11-27 13:31:27 +01:00
|
|
|
* version 0.37
|
2017-02-07 15:05:38 +01:00
|
|
|
|
2017-02-22 17:06:21 +01:00
|
|
|
### Bash client for tldr: community driven man-by-example
|
2017-02-05 18:00:42 +01:00
|
|
|
**A fully-functional [bash](https://tiswww.case.edu/php/chet/bash/bashtop.html)
|
2017-09-22 06:19:52 +02:00
|
|
|
client for the [tldr](https://tldr.sh) project, providing
|
2017-02-05 18:00:42 +01:00
|
|
|
poignant examples of terminal commands.**
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-05-29 10:51:36 +02:00
|
|
|
<img alt="tldr page gif" src="tldr-page.gif" title="tldr page" />
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-06 20:16:54 +01:00
|
|
|
This client can render both the old and the new tldr markup format.
|
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
## Installation
|
|
|
|
Download the tldr bash script to the install location:
|
2016-01-04 07:00:35 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
```bash
|
2017-11-26 12:25:36 +01:00
|
|
|
loc=/usr/local/bin/tldr # elevated privileges needed for some locations
|
|
|
|
sudo wget -qO $loc https://4e4.win/tldr
|
|
|
|
sudo chmod +x $loc
|
2017-02-05 18:00:42 +01:00
|
|
|
```
|
2016-01-04 07:00:35 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
If the location is not in $PATH, you need to specify the path to run it.
|
2017-08-07 07:40:04 +02:00
|
|
|
|
2017-05-29 05:03:56 +02:00
|
|
|
<img alt="tldr page screenshot" src="tldr-page.jpg" title="tldr page" width="600" />
|
2017-11-27 13:31:27 +01:00
|
|
|
<img alt="tldr usage screenshot" src="tldr-usage.jpg" title="tldr usage" width="600" />
|
2017-02-06 04:28:38 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
### Prerequisites
|
2017-08-09 18:36:45 +02:00
|
|
|
coreutils, grep, unzip, curl / wget, less (optional)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-11-27 13:31:27 +01:00
|
|
|
<img alt="tldr list screenshot" src="tldr-list.jpg" title="tldr list" width="600" />
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
## Customisation
|
2017-11-27 13:31:27 +01:00
|
|
|
<img alt="tldr customize screenshot" src="tldr-customize.jpg" title="tldr customize" width="600" />
|
2017-03-12 20:34:04 +01:00
|
|
|
|
|
|
|
The 5 elements in TLDR markup that can be styled with these colors and
|
|
|
|
backgrounds (last one specified will be used) and modes (more can apply):
|
|
|
|
* Colors: Black, Red, Green, Yellow, Blue, Magenta, Cyan, White
|
|
|
|
* BG: BlackBG, RedBG, GreenBG, YellowBG, BlueBG, MagentaBG, CyanBG, WhiteBG
|
|
|
|
* Modes: Bold, Underline, Italic, Inverse
|
2017-03-12 20:40:50 +01:00
|
|
|
|
|
|
|
`Newline` can be added to the style list to add a newline before the element
|
|
|
|
and `Space` to add a space at the start of the line
|
2017-03-12 20:34:04 +01:00
|
|
|
(style items are separated by space, lower/uppercase mixed allowed)
|
2017-02-06 03:05:12 +01:00
|
|
|
* TLDR_TITLE_STYLE (defaults to: Newline Space Bold Yellow)
|
|
|
|
* TLDR_DESCRIPTION_STYLE (defaults to: Space Yellow)
|
2017-03-12 20:34:04 +01:00
|
|
|
* TLDR_EXAMPLE_STYLE (defaults to: Newline Space Bold Green)
|
2017-02-06 03:05:12 +01:00
|
|
|
* TLDR_CODE_STYLE (defaults to: Space Bold Blue)
|
2017-03-12 20:34:04 +01:00
|
|
|
* TLDR_VALUE_ISTYLE (defaults to: Space Bold Cyan)
|
2017-03-12 20:40:50 +01:00
|
|
|
|
2017-03-12 20:34:04 +01:00
|
|
|
The Value style (above) is an Inline style: doesn't take Newline or Space
|
2017-03-12 20:40:50 +01:00
|
|
|
|
2017-03-12 20:34:04 +01:00
|
|
|
Inline styles for help text: default, URL, option, platform, command, header
|
|
|
|
* TLDR_DEFAULT_ISTYLE (defaults to: White)
|
|
|
|
* TLDR_URL_ISTYLE (defaults to: Yellow)
|
|
|
|
* TLDR_HEADER_ISTYLE (defaults to: Bold)
|
|
|
|
* TLDR_OPTION_ISTYLE (defaults to: Bold Yellow)
|
|
|
|
* TLDR_PLATFORM_ISTYLE (defaults to: Bold Blue)
|
|
|
|
* TLDR_COMMAND_ISTYLE (defaults to: Bold Cyan)
|
|
|
|
* TLDR_FILE_ISTYLE (defaults to: Bold Magenta)
|
2017-03-12 20:40:50 +01:00
|
|
|
|
2017-03-12 20:34:04 +01:00
|
|
|
Color/BG (Newline and Space also allowed) for error and info messages
|
|
|
|
* TLDR_ERROR_COLOR (defaults to: Newline Space Red)
|
|
|
|
* TLDR_INFO_COLOR (defaults to: Newline Space Green)
|
2017-03-12 20:40:50 +01:00
|
|
|
|
2017-03-12 20:34:04 +01:00
|
|
|
How many days before freshly downloading a potentially stale page
|
2017-02-06 03:05:12 +01:00
|
|
|
* TLDR_EXPIRY (defaults to: 60)
|
2017-03-12 20:40:50 +01:00
|
|
|
|
2017-03-12 20:34:04 +01:00
|
|
|
Alternative location of pages cache
|
|
|
|
* TLDR_CACHE (not set by default)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-08-09 18:36:45 +02:00
|
|
|
Instead of `less`, use `cat` for output (automatic if less not available)
|
|
|
|
* TLDR_LESS (not set by default; if set to *0* `cat` will be used)
|
|
|
|
|
2017-11-27 13:31:27 +01:00
|
|
|
<img alt="tldr find screenshot" src="tldr-find.jpg" title="tldr find" width="600" />
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-06-09 05:11:18 +02:00
|
|
|
# tldr-lint
|
|
|
|
|
2017-06-09 11:42:45 +02:00
|
|
|
* version 0.11
|
2017-06-09 08:50:18 +02:00
|
|
|
|
2017-06-09 05:11:18 +02:00
|
|
|
### Linter for new syntax tldr source files
|
|
|
|
|
|
|
|
```
|
2017-06-09 05:20:10 +02:00
|
|
|
Usage: tldr-lint [-h|--help] [-V|--version] [-q|--quiet] [<dir>] [<file>]
|
2017-06-09 05:11:18 +02:00
|
|
|
- All *.md files under <dir> and subdirectories are checked
|
|
|
|
- <file> is checked regardless of extension
|
2017-06-09 05:20:10 +02:00
|
|
|
-q, --quiet: No output means check is OK
|
|
|
|
-V, --version: Display version
|
|
|
|
-h, --help: Display this help text
|
2017-06-09 05:11:18 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
coreutils, sed, grep, find
|
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
## Contributing
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
Please file an issue for a question, a bug or a feature request.
|
|
|
|
Or even better, send a pull request!
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-22 11:59:51 +01:00
|
|
|
[tldr-bash-client github page](http://github.com/pepa65/tldr-bash-client "github.com/pepa65/tldr-bash-client")
|
2017-02-06 04:48:48 +01:00
|
|
|
|
2017-02-06 04:26:01 +01:00
|
|
|
<img alt="tldr markdown screenshot" src="tldr-markdown.jpg" title="tldr markdown" width="600" />
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
### License
|
|
|
|
|
2017-06-09 08:50:18 +02:00
|
|
|
Original tldr client in bash by Ray Lee http://github.com/raylee/tldr (MIT license)
|
2017-03-12 20:40:50 +01:00
|
|
|
|
2017-06-09 08:50:18 +02:00
|
|
|
The tldr-bash-client is relicensed under GPLv3+ and tldr-lint is GPLv3+ as well.
|
2017-02-06 20:16:54 +01:00
|
|
|
|
|
|
|
<img alt="tldr new markdown screenshot" src="tldr-markdown-new.jpg" title="tldr new markdown" width="600" />
|