tl;dr (ou tldr) é uma expressão comum da internet, uma abreviação das expressões em inglês “too long” e “didn’t read”. Em português significam “longo demais” e “não li”.
Quem nunca achou chato ler as páginas do manual: man
? Mas agora há um método mais legal para acabar de vez com a preguicite! 😃
Trata-se do tldr.sh. Um utilitário via linha de comando que exibe o stdout
de maneira mais simplificada e atraente.
Por exemplo, se você quiser obter informações rápidas e precisas de algum comando, (ex.: install
), basta usar assim: tldr install
tldr install
install
Copy files and set attributes.
Copy files (often executable) to a system location like /usr/local/bin, give them the appropriate permissions/ownership.
Copy files to destination:
install path/to/source path/to/destination
Copy files to destination, setting their ownership:
install -o user path/to/source path/to/destination
Copy files to destination, setting their group ownership:
install -g user path/to/source path/to/destination
Copy files to destination, setting their mode:
install -m +x path/to/source path/to/destination
Copy files and apply access/modification times of source to destination:
install -p path/to/source path/to/destination
Há diversas maneiras de instalar utilizando os mais variados gerenciadores de pacotes de cada linguagem de programação, exs.: npm
(js), bpkg
(bash), cpan
(perl), gem
(ruby), go
, cargo
, stack
(haskell), pip
(python) e entre outros, inclusive consultando online no endereço: https://tldr.ostera.io/ .
Mais a maneira universal de funcionar, que foi como eu fiz, é clonar o repositório e mover para sua ${PATH}
:
Precisa ter o Git instalado.
git clone https://github.com/avih/tldr-fmt
sudo mv tldr-fmt/ttldr /usr/local/bin/tldr
Se tiver algum caminho local incluido na sua PATH
, melhor ainda!
Depois é só rodar o comando:
Na primeira vez, somente na primeira, ele vai fazer um update com curl
Exemplo:
tldr bash
bash
Bourne-Again SHell.
sh-compatible command line interpreter.
More information: https://gnu.org/software/bash .
Start interactive shell:
bash
Execute a command:
bash -c "command"
Run commands from a file:
bash file.sh
Run commands from a file, logging all commands executed to the terminal:
bash -x file.sh
Run commands from a file, stopping at the first error:
bash -e file.sh
Run commands from stdin:
bash -s
Print the version information of bash (use echo $BASH_VERSION to show just the version without license information):
bash --version
Show esse guia rápido, né?!
Compartilhe esse artigo!