Contribution are most welcome! All tldr
pages are stored in Markdown right here on GitHub. Just open an issue or send a pull request and we'll merge it as soon as possible.
Note: when submitting a new command, don't forget to check if there's already a pull request in progress.
Note that tldr
is focused on concrete examples.
Here's a few guidelines to get started:
man
is for.{{source_file}}
or {{wallet.txt}}
.The best way to be consistent is to have a look at a few existing pages :)
The format of each page should match the following:
# command-name
> Short description
> Max 1 or 2 lines
- example description
`command -opt1 -opt2 -arg1 {{arg_value}}`
- example description
`command -opt1 -opt2`
User-provided values should use the {{token}}
syntax, to allow clients to highlight them. For example: tar cf {{file}}
One of the reasons for this format is that it's well suited for command-line clients that need to extract a single description/example.
TL;DR: fork, make setup
, feature branch, commit, push, pull request.
Detailed explanation:
Fork the project, clone your fork, and configure the remotes:
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/tldr
# Navigate to the newly cloned directory
cd tldr
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/tldr-pages/tldr
Setup Ruby, Rubygems, bundler, Git pre-commit hooks with Markdown linter.
# Assuming Ruby is set up
# Install bundler Ruby gem
gem install bundler
make setup
If you cloned a while ago, get the latest changes from upstream:
git checkout master
git pull upstream master
Create a new topic branch (sometimes they are called feature branches) off the main project development branch:
git checkout -b <topic-branch-name>
Run make lint
to check that your page(s) are correct.
Please use the following commit message format:
<command>: type of change
.
Examples:
ls: add page
cat: fix typo
git-push: add --force example
uname: fix -a example
Push your topic branch up to your fork:
git push origin <topic-branch-name>
Open a Pull Request with a clear title and description.
Use Git's interactive rebase feature to tidy up your commits before making them public. In most cases it is better to squash commits before submitting a pull request.
If you are asked to amend your changes before they can be merged in, please
use git commit --amend
and force push to your remote feature branch.
You may also be asked to squash commits.
tldr
is under MIT license.
IMPORTANT: By submitting a patch, you agree to license your work under the same license as that used by the project.
You're free to modify or redistribute the content. That being said, but why not contribute over here? :) Say if you wanted to have tldr
pages in groff
format, why not have a client that uses pandoc and periodically updates straight from this repo?