From e2776841ad8fd9cca68b03576c48bd2c57536ab2 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 4 Sep 2024 00:16:06 +0000 Subject: [PATCH] Update cheatsheets --- tldr/bat | 10 +++++----- tldr/git-add | 12 ++++++------ tldr/git-annotate | 4 ++-- tldr/git-archive | 12 ++++++------ tldr/git-blame | 2 +- tldr/git-branch | 4 ++-- tldr/git-cherry | 2 +- tldr/git-clean | 8 ++++---- tldr/git-diff-tree | 2 +- tldr/git-lfs | 2 +- tldr/git-log | 2 +- tldr/git-rebase | 6 +++--- tldr/git-reflog | 2 +- tldr/git-remote | 2 +- tldr/git-rev-list | 2 +- tldr/git-revert | 2 +- tldr/git-shortlog | 8 ++++---- tldr/git-svn | 2 +- tldr/git-tag | 2 +- tldr/http | 2 +- tldr/mitmproxy | 6 +++--- 21 files changed, 47 insertions(+), 47 deletions(-) diff --git a/tldr/bat b/tldr/bat index bb80e2a6..91a79359 100644 --- a/tldr/bat +++ b/tldr/bat @@ -23,20 +23,20 @@ source: https://github.com/tldr-pages/tldr.git - Highlight a specific line or a range of lines with a different background color: -`bat {{--highlight-line|-H}} {{10|5:10|:10|10:|10:+5}} {{path/to/file}}` +`bat {{-H|--highlight-line}} {{10|5:10|:10|10:|10:+5}} {{path/to/file}}` - Show non-printable characters like space, tab or newline: -`bat {{--show-all|-A}} {{path/to/file}}` +`bat {{-A|--show-all}} {{path/to/file}}` - Remove all decorations except line numbers in the output: -`bat {{--number|-n}} {{path/to/file}}` +`bat {{-n|--number}} {{path/to/file}}` - Syntax highlight a JSON file by explicitly setting the language: -`bat {{--language|-l}} json {{path/to/file.json}}` +`bat {{-l|--language}} json {{path/to/file.json}}` - Display all supported languages: -`bat {{--list-languages|-L}}` +`bat {{-L|--list-languages}}` diff --git a/tldr/git-add b/tldr/git-add index b06dee9c..eb054430 100644 --- a/tldr/git-add +++ b/tldr/git-add @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Add all files (tracked and untracked): -`git add {{--all|-A}}` +`git add {{-A|--all}}` - Add all files in the current folder: @@ -22,20 +22,20 @@ source: https://github.com/tldr-pages/tldr.git - Only add already tracked files: -`git add {{--update|-u}}` +`git add {{-u|--update}}` - Also add ignored files: -`git add {{--force|-f}}` +`git add {{-f|--force}}` - Interactively stage parts of files: -`git add {{--patch|-p}}` +`git add {{-p|--patch}}` - Interactively stage parts of a given file: -`git add {{--patch|-p}} {{path/to/file}}` +`git add {{-p|--patch}} {{path/to/file}}` - Interactively stage a file: -`git add {{--interactive|-i}}` +`git add {{-i|--interactive}}` diff --git a/tldr/git-annotate b/tldr/git-annotate index 686169c8..bde7c181 100644 --- a/tldr/git-annotate +++ b/tldr/git-annotate @@ -14,9 +14,9 @@ source: https://github.com/tldr-pages/tldr.git `git annotate {{path/to/file}}` -- Print a file with the author [e]mail and commit hash prepended to each line: +- Print a file with the author email and commit hash prepended to each line: -`git annotate {{--show-email|-e}} {{path/to/file}}` +`git annotate {{-e|--show-email}} {{path/to/file}}` - Print only rows that match a regular expression: diff --git a/tldr/git-archive b/tldr/git-archive index 6a106dc8..ce6b928c 100644 --- a/tldr/git-archive +++ b/tldr/git-archive @@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git - Create a tar archive from the contents of the current HEAD and print it to `stdout`: -`git archive {{--verbose|-v}} HEAD` +`git archive {{-v|--verbose}} HEAD` - Use the Zip format and report progress verbosely: -`git archive {{--verbose|-v}} --format zip HEAD` +`git archive {{-v|--verbose}} --format zip HEAD` - Output the Zip archive to a specific file: -`git archive {{--verbose|-v}} {{--output|-o}} {{path/to/file.zip}} HEAD` +`git archive {{-v|--verbose}} {{-o|--output}} {{path/to/file.zip}} HEAD` - Create a tar archive from the contents of the latest commit of a specific branch: -`git archive {{--output|-o}} {{path/to/file.tar}} {{branch_name}}` +`git archive {{-o|--output}} {{path/to/file.tar}} {{branch_name}}` - Use the contents of a specific directory: -`git archive {{--output|-o}} {{path/to/file.tar}} HEAD:{{path/to/directory}}` +`git archive {{-o|--output}} {{path/to/file.tar}} HEAD:{{path/to/directory}}` - Prepend a path to each file to archive it inside a specific directory: -`git archive {{--output|-o}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD` +`git archive {{-o|--output}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD` diff --git a/tldr/git-blame b/tldr/git-blame index 7d53a4fc..fb33481c 100644 --- a/tldr/git-blame +++ b/tldr/git-blame @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Print file with author email and commit hash on each line: -`git blame {{--show-email|-e}} {{path/to/file}}` +`git blame {{-e|--show-email}} {{path/to/file}}` - Print file with author name and commit hash on each line at a specific commit: diff --git a/tldr/git-branch b/tldr/git-branch index 271e63b8..174ad79b 100644 --- a/tldr/git-branch +++ b/tldr/git-branch @@ -30,11 +30,11 @@ source: https://github.com/tldr-pages/tldr.git - Rename a branch (must not have it checked out to do this): -`git branch {{--move|-m}} {{old_branch_name}} {{new_branch_name}}` +`git branch {{-m|--move}} {{old_branch_name}} {{new_branch_name}}` - Delete a local branch (must not have it checked out to do this): -`git branch {{--delete|-d}} {{branch_name}}` +`git branch {{-d|--delete}} {{branch_name}}` - Delete a remote branch: diff --git a/tldr/git-cherry b/tldr/git-cherry index c577692c..9c93d7ae 100644 --- a/tldr/git-cherry +++ b/tldr/git-cherry @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Show commits (and their messages) with equivalent commits upstream: -`git cherry {{--verbose|-v}}` +`git cherry {{-v|--verbose}}` - Specify a different upstream and topic branch: diff --git a/tldr/git-clean b/tldr/git-clean index dff85ab6..8877640d 100644 --- a/tldr/git-clean +++ b/tldr/git-clean @@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git `git clean` -- [i]nteractively delete untracked files: +- Interactively delete untracked files: -`git clean {{--interactive|-i}}` +`git clean {{-i|--interactive}}` - Show which files would be deleted without actually deleting them: @@ -22,11 +22,11 @@ source: https://github.com/tldr-pages/tldr.git - Forcefully delete untracked files: -`git clean {{--force|-f}}` +`git clean {{-f|--force}}` - Forcefully delete untracked [d]irectories: -`git clean {{--force|-f}} -d` +`git clean {{-f|--force}} -d` - Delete untracked files, including e[x]cluded files (files ignored in `.gitignore` and `.git/info/exclude`): diff --git a/tldr/git-diff-tree b/tldr/git-diff-tree index d6c7850f..a4b4e721 100644 --- a/tldr/git-diff-tree +++ b/tldr/git-diff-tree @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Display changes in patch format: -`git diff-tree {{--patch|-p}} {{tree-ish1}} {{tree-ish2}}` +`git diff-tree {{-p|--patch}} {{tree-ish1}} {{tree-ish2}}` - Filter changes by a specific path: diff --git a/tldr/git-lfs b/tldr/git-lfs index 89bc4fca..1e09d5d3 100644 --- a/tldr/git-lfs +++ b/tldr/git-lfs @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Change the Git LFS endpoint URL (useful if the LFS server is separate from the Git server): -`git config {{--file|-f}} .lfsconfig lfs.url {{lfs_endpoint_url}}` +`git config {{-f|--file}} .lfsconfig lfs.url {{lfs_endpoint_url}}` - List tracked patterns: diff --git a/tldr/git-log b/tldr/git-log index d89a5db6..56baebf4 100644 --- a/tldr/git-log +++ b/tldr/git-log @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Show only commits with messages that include a specific string, ignoring case: -`git log {{--regexp-ignore-case|-i}} --grep {{search_string}}` +`git log {{-i|--regexp-ignore-case}} --grep {{search_string}}` - Show the last N number of commits from a certain author: diff --git a/tldr/git-rebase b/tldr/git-rebase index 9fc04390..bca19ff5 100644 --- a/tldr/git-rebase +++ b/tldr/git-rebase @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Start an interactive rebase, which allows the commits to be reordered, omitted, combined or modified: -`git rebase {{--interactive|-i}} {{target_base_branch_or_commit_hash}}` +`git rebase {{-i|--interactive}} {{target_base_branch_or_commit_hash}}` - Continue a rebase that was interrupted by a merge failure, after editing conflicting files: @@ -35,8 +35,8 @@ source: https://github.com/tldr-pages/tldr.git - Reapply the last 5 commits in-place, stopping to allow them to be reordered, omitted, combined or modified: -`git rebase {{--interactive|-i}} {{HEAD~5}}` +`git rebase {{-i|--interactive}} {{HEAD~5}}` - Auto-resolve any conflicts by favoring the working branch version (`theirs` keyword has reversed meaning in this case): -`git rebase {{--strategy-option|-X}} theirs {{branch_name}}` +`git rebase {{-X|--strategy-option}} theirs {{branch_name}}` diff --git a/tldr/git-reflog b/tldr/git-reflog index 1b8b2a8d..af5a0cb4 100644 --- a/tldr/git-reflog +++ b/tldr/git-reflog @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Show only the 5 latest entries in the reflog: -`git reflog {{--dry-run|-n}} {{5}}` +`git reflog {{-n|--dry-run}} {{5}}` diff --git a/tldr/git-remote b/tldr/git-remote index b5d3d98e..bda17133 100644 --- a/tldr/git-remote +++ b/tldr/git-remote @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - List existing remotes with their names and URLs: -`git remote {{--verbose|-v}}` +`git remote {{-v|--verbose}}` - Show information about a remote: diff --git a/tldr/git-rev-list b/tldr/git-rev-list index 08224e0e..4186e9d1 100644 --- a/tldr/git-rev-list +++ b/tldr/git-rev-list @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Print the latest commit that changed (add/edit/remove) a specific file on the current branch: -`git rev-list {{--max-count|-n}} 1 HEAD -- {{path/to/file}}` +`git rev-list {{-n|--max-count}} 1 HEAD -- {{path/to/file}}` - List commits more recent than a specific date, on a specific branch: diff --git a/tldr/git-revert b/tldr/git-revert index b3405943..193110cc 100644 --- a/tldr/git-revert +++ b/tldr/git-revert @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Don't create new commits, just change the working tree: -`git revert {{--no-commit|-n}} {{0c01a9..9a1743}}` +`git revert {{-n|--no-commit}} {{0c01a9..9a1743}}` diff --git a/tldr/git-shortlog b/tldr/git-shortlog index da4bc8ca..a2f35a16 100644 --- a/tldr/git-shortlog +++ b/tldr/git-shortlog @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - View a summary of all the commits made, sorted by the number of commits made: -`git shortlog {{--numbered|-n}}` +`git shortlog {{-n|--numbered}}` - View a summary of all the commits made, grouped by the committer identities (name and email): -`git shortlog {{--committer|-c}}` +`git shortlog {{-c|--committer}}` - View a summary of the last 5 commits (i.e. specify a revision range): @@ -26,8 +26,8 @@ source: https://github.com/tldr-pages/tldr.git - View all users, emails and the number of commits in the current branch: -`git shortlog {{--summary|-s}} {{--numbered|-n}} {{--email|-e}}` +`git shortlog {{-s|--summary}} {{-n|--numbered}} {{-e|--email}}` - View all users, emails and the number of commits in all branches: -`git shortlog {{--summary|-s}} {{--numbered|-n}} {{--email|-e}} --all` +`git shortlog {{-s|--summary}} {{-n|--numbered}} {{-e|--email}} --all` diff --git a/tldr/git-svn b/tldr/git-svn index e2ec91d5..87ab76cb 100644 --- a/tldr/git-svn +++ b/tldr/git-svn @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Clone an SVN repository starting at a given revision number: -`git svn clone {{--revision|-r}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` +`git svn clone {{-r|--revision}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` - Update local clone from the remote SVN repository: diff --git a/tldr/git-tag b/tldr/git-tag index d3b1cd92..b281f54b 100644 --- a/tldr/git-tag +++ b/tldr/git-tag @@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Delete the tag with the given name: -`git tag {{--delete|-d}} {{tag_name}}` +`git tag {{-d|--delete}} {{tag_name}}` - Get updated tags from remote: diff --git a/tldr/http b/tldr/http index 52f62095..b2ff2350 100644 --- a/tldr/http +++ b/tldr/http @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Follow any `3xx` redirects and specify additional headers in a request: -`http {{--follow|-F}} {{https://example.com}} {{'User-Agent: Mozilla/5.0' 'Accept-Encoding: gzip'}}` +`http {{-F|--follow}} {{https://example.com}} {{'User-Agent: Mozilla/5.0' 'Accept-Encoding: gzip'}}` - Authenticate to a server using different authentication methods: diff --git a/tldr/mitmproxy b/tldr/mitmproxy index 1bf4db78..f949a112 100644 --- a/tldr/mitmproxy +++ b/tldr/mitmproxy @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Start `mitmproxy` bound to a custom address and port: -`mitmproxy --listen-host {{ip_address}} {{--listen-port|-p}} {{port}}` +`mitmproxy --listen-host {{ip_address}} {{-p|--listen-port}} {{port}}` - Start `mitmproxy` using a script to process traffic: -`mitmproxy {{--scripts|-s}} {{path/to/script.py}}` +`mitmproxy {{-s|--scripts}} {{path/to/script.py}}` - Export the logs with SSL/TLS master keys to external programs (wireshark, etc.): @@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify mode of operation of the proxy server (`regular` is the default): -`mitmproxy {{--mode|-m}} {{regular|transparent|socks5|...}}` +`mitmproxy {{-m|--mode}} {{regular|transparent|socks5|...}}` - Set the console layout: