From 78d0ad20118323d041d04ac02bec5fbe5b7ff619 Mon Sep 17 00:00:00 2001 From: gsspdev Date: Tue, 11 Feb 2025 04:38:42 -0600 Subject: [PATCH] print: add page (#15597) Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Starbeamrainbowlabs --- pages/common/print.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pages/common/print.md diff --git a/pages/common/print.md b/pages/common/print.md new file mode 100644 index 0000000000..85fb55a4b6 --- /dev/null +++ b/pages/common/print.md @@ -0,0 +1,25 @@ +# 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 "Linel" "Line 2" "Line3"` + +- Print without trailing newline: + +`print -n "Hello"; print "World"` + +- Enable backslash escapes: + +`print -e "Line 1\nLine2"` + +- Print arguments as described by 'printf' (for greater portability across shells, consider instead the `printf` command): + +`print -f "%s is %d years old.\n" "Alice" 30`