From c5566dcc1c85d39b147d1cefb3d428694c65a006 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Mon, 16 Sep 2024 00:17:25 +0000 Subject: [PATCH] Update cheatsheets --- tldr/docker-rmi | 2 +- tldr/nnn | 4 ++++ tldr/tspin | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tldr/tspin diff --git a/tldr/docker-rmi b/tldr/docker-rmi index 99fda005..e5068bf7 100644 --- a/tldr/docker-rmi +++ b/tldr/docker-rmi @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # docker rmi > Remove Docker images. -> More information: . +> More information: . - Display help: diff --git a/tldr/nnn b/tldr/nnn index 6d64fa1d..c3dc32e1 100644 --- a/tldr/nnn +++ b/tldr/nnn @@ -27,3 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Sort files on [a]pparent disk usage / [d]isk usage / [e]xtension / [r]everse / [s]ize / [t]ime / [v]ersion: `nnn -T {{a|d|e|r|s|t|v}}` + +- Open a file you have selected. Select the file then press `o`, and type a program to open the file in: + +`nnn -o` diff --git a/tldr/tspin b/tldr/tspin new file mode 100644 index 00000000..d28508cb --- /dev/null +++ b/tldr/tspin @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# tspin + +> A log file highlighter based on the `less` pager and basically behaves like any pager. +> More information: . + +- Read from file and view in `less`: + +`tspin {{path/to/application.log}}` + +- Read from another command and print to stdout: + +`journalctl -b --follow | tspin` + +- Read from file and print to `stdout`: + +`tspin {{path/to/application.log}} --print` + +- Read from stdin and print to `stdout`: + +`echo "2021-01-01 12:00:00 [INFO] This is a log message" | tspin`