From d1fa360568cc7328dd38673d78c0ed9c29c4db10 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 20 Feb 2026 00:25:36 +0000 Subject: [PATCH] Update cheatsheets --- tldr/diff | 18 +++++++++--------- tldr/less | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tldr/diff b/tldr/diff index 9d0d5729..7be3b027 100644 --- a/tldr/diff +++ b/tldr/diff @@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git - Compare files (lists changes to turn `old_file` into `new_file`): -`diff {{old_file}} {{new_file}}` +`diff {{path/to/old_file}} {{path/to/new_file}}` - Compare files, ignoring white spaces: -`diff {{[-w|--ignore-all-space]}} {{old_file}} {{new_file}}` +`diff {{[-w|--ignore-all-space]}} {{path/to/old_file}} {{path/to/new_file}}` - Compare files, showing the differences side by side: -`diff {{[-y|--side-by-side]}} {{old_file}} {{new_file}}` +`diff {{[-y|--side-by-side]}} {{path/to/old_file}} {{path/to/new_file}}` - Compare files, showing the differences in unified format (as used by `git diff`): -`diff {{[-u|--unified]}} {{old_file}} {{new_file}}` +`diff {{[-u|--unified]}} {{path/to/old_file}} {{path/to/new_file}}` - Compare directories recursively (shows names for differing files/directories as well as changes made to files): -`diff {{[-r|--recursive]}} {{old_directory}} {{new_directory}}` +`diff {{[-r|--recursive]}} {{path/to/old_directory}} {{path/to/new_directory}}` - Compare directories, only showing the names of files that differ: -`diff {{[-r|--recursive]}} {{[-q|--brief]}} {{old_directory}} {{new_directory}}` +`diff {{[-r|--recursive]}} {{[-q|--brief]}} {{path/to/old_directory}} {{path/to/new_directory}}` - Create a patch file for Git from the differences of two text files, treating nonexistent files as empty: -`diff {{[-a|--text]}} {{[-u|--unified]}} {{[-N|--new-file]}} {{old_file}} {{new_file}} > {{diff.patch}}` +`diff {{[-a|--text]}} {{[-u|--unified]}} {{[-N|--new-file]}} {{path/to/old_file}} {{path/to/new_file}} > {{path/to/diff.patch}}` -- Compare files, showing output in color and try hard to find smaller set of changes: +- Compare files, showing output in color, trying hard to find the smallest set of changes: -`diff {{[-d|--minimal]}} --color=always {{old_file}} {{new_file}}` +`diff {{[-d|--minimal]}} --color=always {{path/to/old_file}} {{path/to/new_file}}` diff --git a/tldr/less b/tldr/less index 1bfdb58d..c88b47fc 100644 --- a/tldr/less +++ b/tldr/less @@ -6,11 +6,11 @@ source: https://github.com/tldr-pages/tldr.git # less > Open a file for interactive reading, allowing scrolling and search. -> More information: . +> More information: . -- Open a file: +- Open a file for interactive reading: -`less {{source_file}}` +`less {{path/to/source_file}}` - Page down/up: @@ -22,11 +22,11 @@ source: https://github.com/tldr-pages/tldr.git - Forward search for a string (press ``/`` to go to next/previous match): -`{{something}}` +`{{pattern}}` - Backward search for a string (press ``/`` to go to next/previous match): -`{{something}}` +`{{pattern}}` - Follow the output of the currently opened file: