aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/printf.txt2
-rw-r--r--doc_src/string.txt4
2 files changed, 3 insertions, 3 deletions
diff --git a/doc_src/printf.txt b/doc_src/printf.txt
index 81082a26..ce7796c8 100644
--- a/doc_src/printf.txt
+++ b/doc_src/printf.txt
@@ -60,7 +60,7 @@ This file has been imported from the printf in GNU Coreutils version 6.9. If you
\subsection printf-example Example
\fish
-printf '%s\t%s\n' flounder fish
+printf '\%s\\t\%s\n' flounder fish
\endfish
Will print "flounder fish" (separated with a tab character), followed by a newline character. This is useful for writing completions, as fish expects completion scripts to output the option followed by the description, separated with a tab character.
diff --git a/doc_src/string.txt b/doc_src/string.txt
index c7781473..37d24435 100644
--- a/doc_src/string.txt
+++ b/doc_src/string.txt
@@ -110,7 +110,7 @@ string trim --right --chars=yz xyzzy zany
\endfish
\fish
-echo \\x07 | string escape
+echo \x07 | string escape
# Output:
# \\cg
\endfish
@@ -193,7 +193,7 @@ string replace -r '(\\w+)\\s+(\\w+)' '$2 $1 $$' 'left right'
# Output:
# right left $
-string replace -r '\s*newline\s*' '\n' 'put a newline here'
+string replace -r '\\s*newline\\s*' '\n' 'put a newline here'
# Output:
# put a
# here