From fdeb98e8593cc5726cabfec6c3593c183d46c404 Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 9 May 2018 00:33:49 +0200 Subject: [PATCH] Add usage examples --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 5102e8da..7db984b9 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,31 @@ Oh.. you can also use it to concatenate files :wink:. Whenever `bat` detects a non-interactive terminal, it will fall back to printing the plain file contents. +## Usage + +Display a single file on the terminal + +``` bash +> bat README.md +``` + +Display multiple files at once + +``` bash +> bat src/*.rs +``` + +Explicitly specify the language + +``` bash +> yaml2json .travis.yml | json_pp | bat -l json +``` + +``` bash +> curl -s https://raw.githubusercontent.com/sharkdp/bat/master/src/main.rs | bat -l rs +``` + + ## Installation ### From binaries