mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-18 17:50:02 +00:00
Update cheatsheets
This commit is contained in:
18
tldr/linux/print.runmailcap
Normal file
18
tldr/linux/print.runmailcap
Normal 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}}`
|
||||
26
tldr/print
26
tldr/print
@@ -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
32
tldr/print.zsh
Normal 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
17
tldr/windows/print.win
Normal 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 oile}}`
|
||||
|
||||
- Print a text file to a specific printer:
|
||||
|
||||
`print /d:{{printer}} {{path oile}}`
|
||||
Reference in New Issue
Block a user