about summary refs log tree commit diff stats
path: root/doc/cha-config.5
diff options
context:
space:
mode:
Diffstat (limited to 'doc/cha-config.5')
-rw-r--r--doc/cha-config.521
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/cha-config.5 b/doc/cha-config.5
index c9b797aa..237d28ad 100644
--- a/doc/cha-config.5
+++ b/doc/cha-config.5
@@ -1,5 +1,5 @@
 '\" t
-.\" Automatically generated by Pandoc 3.3
+.\" Automatically generated by Pandoc 3.4
 .\"
 .TH "cha\-config" "5" "" "" "Configuration of Chawan"
 .SH Configuration of Chawan
@@ -717,7 +717,9 @@ These are to be placed in the table array \f[CR][[omnirule]]\f[R].
 Examples:
 .IP
 .EX
-# Search using DuckDuckGo Lite. (Bound to C\-k by default.)
+# Search using DuckDuckGo Lite.
+# (This rule is included in the default config, although C\-k now invokes
+# Google search.)
 [[omnirule]]
 match = \[aq]\[ha]ddg:\[aq]
 substitute\-url = \[aq](x) => \[dq]https://lite.duckduckgo.com/lite/?kp=\-1&kd=\-1&q=\[dq] + encodeURIComponent(x.split(\[dq]:\[dq]).slice(1).join(\[dq]:\[dq]))\[aq]
@@ -837,8 +839,9 @@ rewrite\-url
 T}@T{
 JavaScript function
 T}@T{
-A JavaScript function Chawan will pass the URL to.
-If a new URL is returned, it will replace the old one.
+A JavaScript function Chawan will pass the site\[cq]s URL object to.
+If a new URL is returned, or the URL object is modified in any way,
+Chawan will transparently redirect the user to this new URL.
 T}@T{
 T}
 T{
@@ -1031,9 +1034,16 @@ Examples:
 .EX
 \f[I]# show change URL when Control, Escape and j are pressed\f[R]
 \[aq]C\-M\-j\[aq] = \[aq]cmd.pager.load\[aq]
+
 \f[I]# go to the first line of the page when g is pressed twice without a preceding\f[R]
 \f[I]# number, or to the line when a preceding number is given.\f[R]
 \[aq]gg\[aq] = \[aq]cmd.buffer.gotoLineOrStart\[aq]
+
+\f[I]# JS functions and expressions are accepted too. Following replaces the\f[R]
+\f[I]# default search engine with DuckDuckGo Lite.\f[R]
+\f[I]# (See api.md for a list of available functions, and a discussion on how\f[R]
+\f[I]# to add your own \[dq]namespaced\[dq] commands like above.)\f[R]
+\[aq]C\-k\[aq] = \[aq]() => pager.load(\[dq]ddg:\[dq])\[aq]
 .EE
 .SS Pager actions
 .PP
@@ -1082,8 +1092,7 @@ T}@T{
 \f[CR]cmd.pager.webSearch\f[R]
 T}@T{
 Open the URL bar with an arbitrary search engine.
-At the moment, this is DuckDuckGo Lite, but this may change in the
-future.
+At the moment, this is Google Search, but this may change in the future.
 T}@T{
 T}
 T{