diff --git a/tldr/linux/print.runmailcap b/tldr/linux/print.runmailcap new file mode 100644 index 00000000..4de65d18 --- /dev/null +++ b/tldr/linux/print.runmailcap @@ -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: . + +- Print action can be used to print any file on default run-mailcap tool: + +`print {{filename}}` + +- With `run-mailcap`: + +`run-mailcap --action=print {{filename}}` diff --git a/tldr/print b/tldr/print index a9eefd8e..7051fdab 100644 --- a/tldr/print +++ b/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: . +> `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` diff --git a/tldr/print.zsh b/tldr/print.zsh new file mode 100644 index 00000000..2beeb60c --- /dev/null +++ b/tldr/print.zsh @@ -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: . + +- 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` diff --git a/tldr/windows/print.win b/tldr/windows/print.win new file mode 100644 index 00000000..408788d8 --- /dev/null +++ b/tldr/windows/print.win @@ -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: . + +- 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}}`