Go to file
pepa65 6aa6f95586 Archive uptodate version 2017-06-21 17:30:26 +07:00
LICENSE First release after having gone overboard in modifications and enhancements, 2017-02-06 00:00:42 +07:00
README.md Tweaked the error messages 2017-06-09 16:42:45 +07:00
package.json Change install method for bpkg, enhanced package.json 2017-03-13 11:06:05 +07:00
tldr Release 0.33 2017-06-04 22:39:01 +07:00
tldr-customize.jpg Correct readme, image of customizations 2017-03-13 02:40:50 +07:00
tldr-lint Fix regex to have dash last in list 2017-06-09 23:27:16 +07:00
tldr-list.jpg Cut down screenshots, removed mention of ncurses (tput) as requirement 2017-02-06 00:19:38 +07:00
tldr-markdown-new.jpg Added rendering of the new markdown as well, 2017-02-07 02:16:54 +07:00
tldr-markdown.jpg Cut down screenshots, removed mention of ncurses (tput) as requirement 2017-02-06 00:19:38 +07:00
tldr-page.gif Better gif 2017-02-26 11:52:00 +07:00
tldr-page.jpg Renamed repo, adapted readme and customize screenshot 2017-02-06 10:48:48 +07:00
tldr-usage.jpg Release 0.33 2017-06-04 22:39:01 +07:00
tldr.txz Archive uptodate version 2017-06-21 17:30:26 +07:00

README.md

tldr-bash-client

  • version 0.33

Bash client for tldr: community driven man-by-example

A fully-functional bash client for the tldr project, providing poignant examples of terminal commands.

tldr page gif

This client can render both the old and the new tldr markup format.

Installation

Download the tldr bash script to the install location:

location=/usr/local/bin/tldr  # elevated privileges needed for some locations
sudo wget -qO $location https://raw.githubusercontent.com/pepa65/tldr-bash-client/master/tldr
sudo chmod +x $location

If the location is not in $PATH, you need to specify the path to run it. Alternately, you can do sudo bpkg-install pepa65/tldr if you have bpkg installed.

tldr page screenshot tldr list screenshot

Prerequisites

coreutils, less, grep, unzip, curl / wget

tldr usage screenshot

Customisation

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

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 (style items are separated by space, lower/uppercase mixed allowed)

  • TLDR_TITLE_STYLE (defaults to: Newline Space Bold Yellow)
  • TLDR_DESCRIPTION_STYLE (defaults to: Space Yellow)
  • TLDR_EXAMPLE_STYLE (defaults to: Newline Space Bold Green)
  • TLDR_CODE_STYLE (defaults to: Space Bold Blue)
  • TLDR_VALUE_ISTYLE (defaults to: Space Bold Cyan)

The Value style (above) is an Inline style: doesn't take Newline or Space

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)

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)

How many days before freshly downloading a potentially stale page

  • TLDR_EXPIRY (defaults to: 60)

Alternative location of pages cache

  • TLDR_CACHE (not set by default)
tldr customize screenshot

tldr-lint

  • version 0.11

Linter for new syntax tldr source files

Usage: tldr-lint [-h|--help] [-V|--version] [-q|--quiet] [<dir>] [<file>]
          - All *.md files under <dir> and subdirectories are checked
          - <file> is checked regardless of extension
          -q, --quiet:    No output means check is OK
          -V, --version:  Display version
          -h, --help:     Display this help text

Prerequisites

coreutils, sed, grep, find

Contributing

Please file an issue for a question, a bug or a feature request. Or even better, send a pull request!

tldr-bash-client github page

tldr markdown screenshot

License

Original tldr client in bash by Ray Lee http://github.com/raylee/tldr (MIT license)

The tldr-bash-client is relicensed under GPLv3+ and tldr-lint is GPLv3+ as well.

tldr new markdown screenshot