Update cheatsheets

This commit is contained in:
ivuorinen
2025-02-25 00:17:51 +00:00
parent 60964ca3f8
commit 88c373e4b4
4 changed files with 74 additions and 19 deletions

View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# print
> An alias to a `run-mailcap`'s action print.
> Originally `run-mailcap` is used to process mime-type/file.
> More information: <https://manned.org/print>.
- Print action can be used to print any file on default run-mailcap tool:
`print {{filename}}`
- With `run-mailcap`:
`run-mailcap --action=print {{filename}}`

View File

@@ -5,28 +5,16 @@ source: https://github.com/tldr-pages/tldr.git
---
# print
> Z Shell (`zsh`) builtin. Prints arguments, similar to `echo`.
> See also: `echo`, `printf`, `zsh`.
> More information: <https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html>.
> `print` can refer to multiple commands with the same name.
- Print input:
- View documentation for the Zsh builtin:
`print "Hello" "World"`
`tldr print.zsh`
- Print separated by newline(s):
- View documentation for the `print` alias of `run-mailcap`:
`print -l "Line1" "Line 2" "Line3"`
`tldr --platform linux print.runmailcap`
- Print without trailing newline:
- View documentation for printing text files on Windows:
`print -n "Hello"; print "World"`
- Enable backslash escapes:
`print -e "Line 1
Line2"`
- Print arguments as described by 'printf' (for greater portability across shells, consider instead the `printf` command):
`print -f "%s is %d years old.
" "Alice" 30`
`tldr --platform windows print.win`

32
tldr/print.zsh Normal file
View File

@@ -0,0 +1,32 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# print
> Z Shell (`zsh`) builtin. Prints arguments, similar to `echo`.
> See also: `echo`, `printf`, `zsh`.
> More information: <https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html>.
- Print input:
`print "Hello" "World"`
- Print separated by newline(s):
`print -l "Line1" "Line 2" "Line3"`
- Print without trailing newline:
`print -n "Hello"; print "World"`
- Enable backslash escapes:
`print -e "Line 1
Line2"`
- Print arguments as described by `printf` (for greater portability across shells, consider using the `printf` command instead):
`print -f "%s is %d years old.
" "Alice" 30`

17
tldr/windows/print.win Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# print
> Print a text file to a printer.
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/print>.
- Print a text file to the default printer:
`print {{path o ile}}`
- Print a text file to a specific printer:
`print /d:{{printer}} {{path o ile}}`