Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-21 00:18:36 +00:00
parent dc2926f45e
commit 374b6c8d34
4 changed files with 27 additions and 6 deletions

View File

@@ -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}}`

View File

@@ -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}}`

21
tldr/npm-deprecate Normal file
View File

@@ -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: <https://docs.npmjs.com/cli/commands/npm-deprecate/>.
- 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}} ""`

View File

@@ -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: <https://manned.org/type>.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-type>.
- Display the type of a command: