From 374b6c8d34ea6ae004a45fbf4e0c8c2fadcf7aff Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 21 Mar 2025 00:18:36 +0000 Subject: [PATCH] Update cheatsheets --- tldr/grep | 2 +- tldr/home-manager | 8 ++++---- tldr/npm-deprecate | 21 +++++++++++++++++++++ tldr/type | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 tldr/npm-deprecate diff --git a/tldr/grep b/tldr/grep index 8298cbdb..24600da7 100644 --- a/tldr/grep +++ b/tldr/grep @@ -24,7 +24,7 @@ source: https://github.com/tldr-pages/tldr.git `grep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}` -- Print 3 lines of context around, before, or after each match: +- Print 3 lines of [C]ontext around, [B]efore or [A]fter each match: `grep --{{context|before-context|after-context}} 3 "{{search_pattern}}" {{path/to/file}}` diff --git a/tldr/home-manager b/tldr/home-manager index 10fbbfbf..0bb0204f 100644 --- a/tldr/home-manager +++ b/tldr/home-manager @@ -16,10 +16,6 @@ source: https://github.com/tldr-pages/tldr.git `home-manager switch` -- Build the configuration for testing without applying it: - -`home-manager test` - - Roll back to a previous configuration generation: `home-manager rollback` @@ -27,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - List all existing configuration generations: `home-manager generations` + +- When using flakes, run any operation that requires nix to run (build, switch, news) by passing the path to the flake: + +`home-manager {{command}} --flake {{path/to/flake}}` diff --git a/tldr/npm-deprecate b/tldr/npm-deprecate new file mode 100644 index 00000000..be7f9e93 --- /dev/null +++ b/tldr/npm-deprecate @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# npm deprecate + +> Mark a version or range of versions of an `npm` package as deprecated. +> More information: . + +- Deprecate a specific version of a package: + +`npm deprecate {{package_name}}@{{version}} "{{deprecation_message}}"` + +- Deprecate a range of versions of a package: + +`npm deprecate {{package_name}}@"<{{version_range}}" "{{deprecation_message}}"` + +- Un-deprecate a specific version of a package: + +`npm deprecate {{package_name}}@{{version}} ""` diff --git a/tldr/type b/tldr/type index f0ea0485..a761129a 100644 --- a/tldr/type +++ b/tldr/type @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Display the type of command the shell will execute. > Note: all examples are not POSIX compliant. -> More information: . +> More information: . - Display the type of a command: