2017-02-05 18:00:42 +01:00
|
|
|
# tldr-bash
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
**A fully-functional [bash](https://tiswww.case.edu/php/chet/bash/bashtop.html)
|
|
|
|
client for the [tldr](https://github.com/rprieto/tldr/) project, providing
|
|
|
|
poignant examples of terminal commands.**
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:27:22 +01:00
|
|
|
![tldr screenshot list](tldr-list.jpg?raw=true)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:27:22 +01:00
|
|
|
![tldr screenshot page](tldr-page.jpg?raw=true)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
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
|
|
|
|
location=/usr/local/bin/tldr # elevated privileges needed for some locations
|
|
|
|
sudo wget -qO $location https://raw.githubusercontent.com/pepa65/tldr/master/tldr
|
|
|
|
sudo chmod +x $location
|
|
|
|
```
|
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.
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
### Prerequisites
|
2017-02-05 18:19:38 +01:00
|
|
|
coreutils, less, grep, unzip, curl / wget
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:27:22 +01:00
|
|
|
![tldr screenshot usage](tldr-usage.jpg?raw=true)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
## Customisation
|
|
|
|
The colors and other styling of the 5 elements of tldr pages can be modified
|
|
|
|
either by editing the first few lines of the scipt, or by setting the following
|
|
|
|
environment variables:
|
|
|
|
* TLDR_TITLE_STYLE (defaults to Newline,Space,Bold,Yellow)
|
|
|
|
* TLDR_DESCRIPTION_STYLE (defaults to Space,Yellow)
|
|
|
|
* TLDR_EXAMPLE_STYLE (defaults to Newline,Bold,Green)
|
|
|
|
* TLDR_CODE_STYLE (defaults to Space,Bold,Blue)
|
|
|
|
* TLDR_VALUE_STYLE (defaults to Bold,Cyan)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
Also the error color and page expiry can easily be set:
|
|
|
|
* TLDR_ERROR_COLOR (defaults to Red)
|
|
|
|
* TLDR_EXPIRY (defaults to 60)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:27:22 +01:00
|
|
|
![tldr screenshot customize](tldr-customize.jpg?raw=true)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
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-05 18:27:22 +01:00
|
|
|
![tldr screenshot markdown](tldr-markdown.jpg?raw=true)
|
2016-01-04 06:33:47 +01:00
|
|
|
|
2017-02-05 18:00:42 +01:00
|
|
|
### License
|
|
|
|
|
|
|
|
Relicensed under GPL v3+
|