diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-01 16:48:20 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-01 16:54:03 +0200 |
commit | 2fdc5d2a95a4db8ab9600cc95632647a3da98e23 (patch) | |
tree | 930564fee3699bec9a11314465f22639b5cf428f /doc | |
parent | 7bd7f887137d67668846a37a12ef333e6029d2fa (diff) | |
download | chawan-2fdc5d2a95a4db8ab9600cc95632647a3da98e23.tar.gz |
config: add insecure-ssl-no-verify option to siteconf
Equivalent to curl --insecure. Note: unfortunately this does not help if the server is using unsafe legacy renegotiation, you have to allow that in the OpenSSL config.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cha-config.5 | 653 | ||||
-rw-r--r-- | doc/config.md | 25 |
2 files changed, 328 insertions, 350 deletions
diff --git a/doc/cha-config.5 b/doc/cha-config.5 index b95bf9dc..cc8a33de 100644 --- a/doc/cha-config.5 +++ b/doc/cha-config.5 @@ -1,24 +1,8 @@ '\" t -.\" Automatically generated by Pandoc 2.17.1.1 +.\" Automatically generated by Pandoc 3.1.12.3 .\" -.\" Define V font for inline verbatim, using C font in formats -.\" that render this, and otherwise B font. -.ie "\f[CB]x\f[]"x" \{\ -. ftr V B -. ftr VI BI -. ftr VB B -. ftr VBI BI -.\} -.el \{\ -. ftr V CR -. ftr VI CI -. ftr VB CB -. ftr VBI CBI -.\} -.TH "cha-config" "5" "" "" "Configuration of Chawan" -.hy +.TH "cha\-config" "5" "" "" "Configuration of Chawan" .SH Configuration of Chawan -.PP Chawan supports configuration of various options like keybindings, user stylesheets, site preferences, etc. The configuration format is very similar to toml, with the following @@ -32,25 +16,22 @@ This allows users to disable default table array rules. .PP Example: .IP -.nf -\f[C] +.EX omnirule = [] # note: this must be placed at the beginning of the file. -[[omnirule]] # this is legal. all default omni-rules are now disabled. -\f[R] -.fi +[[omnirule]] # this is legal. all default omni\-rules are now disabled. +.EE .PP Chawan will look for a config file in the $XDG_CONFIG_HOME/chawan/ -directory called \f[V]config.toml\f[R]. +directory called \f[CR]config.toml\f[R]. (Chawan defaults to \[ti]/.config if the XDG_CONFIG_HOME environment variable is not set.) See the default configuration file in the res/ folder, and bonus configuration files in the bonus/ folder for further examples. .SS Start +Start\-up options are to be placed in the \f[CR][start]\f[R] section. .PP -Start-up options are to be placed in the \f[V][start]\f[R] section. -.PP -Following is a list of start-up options: +Following is a list of start\-up options: .PP .TS tab(@); @@ -65,20 +46,20 @@ T}@T{ T} _ T{ -visual-home +visual\-home T}@T{ url T}@T{ -Page opened when Chawan is called with the -V option (and no other pages -are passed as arguments.) +Page opened when Chawan is called with the \-V option (and no other +pages are passed as arguments.) T}@T{ T} T{ -startup-script +startup\-script T}@T{ JavaScript code T}@T{ -Script Chawan runs on start-up. +Script Chawan runs on start\-up. Pages will not be loaded until this function exits. (Note however that asynchronous functions like setTimeout do not block loading.) @@ -90,15 +71,15 @@ T}@T{ boolean T}@T{ Whether Chawan should always start in headless mode. -Automatically enabled when Chawan is called with -r. +Automatically enabled when Chawan is called with \-r. T}@T{ T} T{ -console-buffer +console\-buffer T}@T{ boolean T}@T{ -Whether Chawan should open a console buffer in non-headless mode. +Whether Chawan should open a console buffer in non\-headless mode. Defaults to true. Warning: this is only useful for debugging. Disabling this option without manually redirecting standard error will @@ -107,8 +88,7 @@ T}@T{ T} .TE .SS Search -.PP -Search options are to be placed in the \f[V][search]\f[R] section. +Search options are to be placed in the \f[CR][search]\f[R] section. .PP Following is a list of search options: .PP @@ -133,22 +113,21 @@ When set to true, searchNext/searchPrev wraps around the document. T}@T{ T} T{ -ignore-case +ignore\-case T}@T{ boolean T}@T{ -When set to true, document-wide searches are case-insensitive by +When set to true, document\-wide searches are case\-insensitive by default. -Note: this can also be overridden inline in the search bar (vim-style), -with the escape sequences \f[V]c\f[R] (ignore case) and \f[V]C\f[R] +Note: this can also be overridden inline in the search bar (vim\-style), +with the escape sequences \f[CR]c\f[R] (ignore case) and \f[CR]C\f[R] (strict case). See search mode for details.) T}@T{ T} .TE .SS Encoding -.PP -Encoding options are to be placed in the \f[V][encoding]\f[R] section. +Encoding options are to be placed in the \f[CR][encoding]\f[R] section. .PP Following is a list of encoding options: .PP @@ -165,7 +144,7 @@ T}@T{ T} _ T{ -document-charset +document\-charset T}@T{ array of charset label strings T}@T{ @@ -178,20 +157,19 @@ correctly. T}@T{ T} T{ -display-charset +display\-charset T}@T{ string T}@T{ Character set for keyboard input and displaying documents. Used in dump mode as well. -(This means that e.g.\ \f[V]cha -I EUC-JP -O UTF-8 a > b\f[R] is -equivalent to \f[V]iconv -f EUC-JP -t UTF-8\f[R].) +(This means that e.g.\ \f[CR]cha \-I EUC\-JP \-O UTF\-8 a > b\f[R] is +equivalent to \f[CR]iconv \-f EUC\-JP \-t UTF\-8\f[R].) T}@T{ T} .TE .SS External -.PP -External options are to be placed in the \f[V][external]\f[R] section. +External options are to be placed in the \f[CR][external]\f[R] section. .PP Following is a list of external options: .PP @@ -230,25 +208,25 @@ T}@T{ array of paths T}@T{ Search path for mailcap files. -(See \f[B]cha-mailcap\f[R](5) for details.) +(See \f[B]cha\-mailcap\f[R](5) for details.) T}@T{ T} T{ -mime-types +mime\-types T}@T{ array of paths T}@T{ Search path for mime.types files. -(See \f[B]cha-mime.types\f[R](5) for details.) +(See \f[B]cha\-mime.types\f[R](5) for details.) T}@T{ T} T{ -cgi-dir +cgi\-dir T}@T{ array of paths T}@T{ Search path for local CGI scripts. -(See \f[B]cha-localcgi\f[R](5) for details.) +(See \f[B]cha\-localcgi\f[R](5) for details.) T}@T{ T} T{ @@ -257,33 +235,32 @@ T}@T{ array of paths T}@T{ Search path for urimethodmap files. -(See \f[B]cha-urimethodmap\f[R](5) for details.) +(See \f[B]cha\-urimethodmap\f[R](5) for details.) T}@T{ T} T{ -w3m-cgi-compat +w3m\-cgi\-compat T}@T{ boolean T}@T{ Enable local CGI compatibility with w3m. -In short, it redirects \f[V]file:///cgi-bin/*\f[R] and -\f[V]file:///$LIB/cgi-bin/*\f[R] to \f[V]cgi-bin:*\f[R]. -For further details, see \f[B]cha-localcgi\f[R](5). +In short, it redirects \f[CR]file:///cgi\-bin/*\f[R] and +\f[CR]file:///$LIB/cgi\-bin/*\f[R] to \f[CR]cgi\-bin:*\f[R]. +For further details, see \f[B]cha\-localcgi\f[R](5). T}@T{ T} T{ -download-dir +download\-dir T}@T{ string T}@T{ -Path to pre-fill for \[lq]Save to:\[rq] prompts. +Path to pre\-fill for \[lq]Save to:\[rq] prompts. This is not validated, you can set it to whatever you find useful. T}@T{ T} .TE .SS Input -.PP -Input options are to be placed in the \f[V][input]\f[R] section. +Input options are to be placed in the \f[CR][input]\f[R] section. .PP .TS tab(@); @@ -298,18 +275,18 @@ T}@T{ T} _ T{ -vi-numeric-prefix +vi\-numeric\-prefix T}@T{ boolean T}@T{ -Whether vi-style numeric prefixes to commands should be accepted. +Whether vi\-style numeric prefixes to commands should be accepted. When set to true, commands that return a function will be called with the numeric prefix as their first argument. Note: this only applies for keybindings defined in [page]. T}@T{ T} T{ -use-mouse +use\-mouse T}@T{ boolean T}@T{ @@ -321,10 +298,9 @@ T} .PP Examples: .IP -.nf -\f[C] +.EX [input] -vi-numeric-prefix = true +vi\-numeric\-prefix = true [page] # Here, the arrow function will be called with the vi numbered prefix if @@ -332,11 +308,9 @@ vi-numeric-prefix = true # The numeric prefix can never be zero, so it is safe to test for undefined # using the ternary operator. G = \[aq]n => n ? pager.gotoLine(n) : pager.cursorLastLine()\[aq] -\f[R] -.fi +.EE .SS Network -.PP -Network options are to be placed in the \f[V][network]\f[R] section. +Network options are to be placed in the \f[CR][network]\f[R] section. .PP .TS tab(@); @@ -351,7 +325,7 @@ T}@T{ T} _ T{ -max-redirect +max\-redirect T}@T{ number T}@T{ @@ -359,25 +333,25 @@ Maximum number of redirections to follow. T}@T{ T} T{ -prepend-scheme +prepend\-scheme T}@T{ string T}@T{ Prepend this to URLs passed to Chawan without a scheme. -Note that local files (\f[V]file:\f[R] scheme) will always be checked +Note that local files (\f[CR]file:\f[R] scheme) will always be checked first; only if this fails, Chawan will retry the request with -\f[V]prepend-scheme\f[R] set as the scheme. +\f[CR]prepend\-scheme\f[R] set as the scheme. By default, this is set to \[lq]https://\[rq]. Note that the \[lq]://\[rq] part is mandatory. T}@T{ T} T{ -prepend-https +prepend\-https T}@T{ boolean T}@T{ -Deprecated: use prepend-scheme instead. -When set to false, Chawan will act as if prepend-scheme were set to +Deprecated: use prepend\-scheme instead. +When set to false, Chawan will act as if prepend\-scheme were set to \[lq]\[lq]. T}@T{ T} @@ -392,9 +366,9 @@ Can be overridden by siteconf. T}@T{ T} T{ -default-headers +default\-headers T}@T{ -Table +table T}@T{ Specify a list of default headers for all HTTP(S) network requests. Can be overridden by siteconf. @@ -402,8 +376,7 @@ T}@T{ T} .TE .SS Display -.PP -Display options are to be placed in the \f[V][display]\f[R] section. +Display options are to be placed in the \f[CR][display]\f[R] section. .PP Following is a list of display options: .PP @@ -420,21 +393,21 @@ T}@T{ T} _ T{ -color-mode +color\-mode T}@T{ -\[lq]monochrome\[rq] / \[lq]ansi\[rq] / \[lq]eight-bit\[rq] / -\[lq]true-color\[rq] / \[lq]auto\[rq] +\[lq]monochrome\[rq] / \[lq]ansi\[rq] / \[lq]eight\-bit\[rq] / +\[lq]true\-color\[rq] / \[lq]auto\[rq] T}@T{ Set the color mode. \[lq]auto\[rq] for automatic detection, \[lq]monochrome\[rq] for black -on white, \[lq]ansi\[rq] for ansi colors, \[lq]eight-bit\[rq] for -256-color mode, and \[lq]true-color\[rq] for true colors. -\[lq]8bit\[rq] is accepted as a legacy alias of \[lq]eight-bit\[rq]. -\[lq]24bit\[rq] is accepted as a legacy alias of \[lq]true-color\[rq]. +on white, \[lq]ansi\[rq] for ansi colors, \[lq]eight\-bit\[rq] for +256\-color mode, and \[lq]true\-color\[rq] for true colors. +\[lq]8bit\[rq] is accepted as a legacy alias of \[lq]eight\-bit\[rq]. +\[lq]24bit\[rq] is accepted as a legacy alias of \[lq]true\-color\[rq]. T}@T{ T} T{ -format-mode +format\-mode T}@T{ \[lq]auto\[rq] / [\[lq]bold\[rq], \[lq]italic\[rq], \[lq]underline\[rq], \[lq]reverse\[rq], \[lq]strike\[rq], \[lq]overline\[rq], @@ -442,11 +415,11 @@ T}@T{ T}@T{ Specifies output formatting modes. Accepts the string \[lq]auto\[rq] or an array of specific attributes. -An empty array (\f[V][]\f[R]) disables formatting completely. +An empty array (\f[CR][]\f[R]) disables formatting completely. T}@T{ T} T{ -no-format-mode +no\-format\-mode T}@T{ [\[lq]bold\[rq], \[lq]italic\[rq], \[lq]underline\[rq], \[lq]reverse\[rq], \[lq]strike\[rq], \[lq]overline\[rq], @@ -456,7 +429,7 @@ Disable specified formatting modes. T}@T{ T} T{ -emulate-overline +emulate\-overline T}@T{ boolean T}@T{ @@ -465,7 +438,7 @@ overlines are substituted by underlines on the previous line. T}@T{ T} T{ -alt-screen +alt\-screen T}@T{ \[lq]auto\[rq] / boolean T}@T{ @@ -473,7 +446,7 @@ Enable/disable the alternative screen. T}@T{ T} T{ -highlight-color +highlight\-color T}@T{ color T}@T{ @@ -482,7 +455,7 @@ Both hex values and CSS color names are accepted. T}@T{ T} T{ -highlight-marks +highlight\-marks T}@T{ boolean T}@T{ @@ -490,28 +463,28 @@ Enable/disable highlighting of marks. T}@T{ T} T{ -double-width-ambiguous +double\-width\-ambiguous T}@T{ boolean T}@T{ Assume the terminal displays characters in the East Asian Ambiguous -category as double-width characters. -Useful when e.g.\ \[ci] occupies two cells. +category as double\-width characters. +Useful when e.g.\ ○ occupies two cells. T}@T{ T} T{ -minimum-contrast +minimum\-contrast T}@T{ number T}@T{ Specify the minimum difference between the luminance (Y) of the background and the foreground. --1 disables this function (i.e.\ allows black letters on black +\-1 disables this function (i.e.\ allows black letters on black background, etc). T}@T{ T} T{ -force-clear +force\-clear T}@T{ boolean T}@T{ @@ -519,7 +492,7 @@ Force the screen to be completely cleared every time it is redrawn. T}@T{ T} T{ -set-title +set\-title T}@T{ boolean T}@T{ @@ -528,7 +501,7 @@ page. T}@T{ T} T{ -default-background-color +default\-background\-color T}@T{ \[lq]auto\[rq] / color T}@T{ @@ -537,7 +510,7 @@ Overrides the assumed background color of the terminal. T}@T{ T} T{ -default-foreground-color +default\-foreground\-color T}@T{ \[lq]auto\[rq] / color T}@T{ @@ -546,7 +519,7 @@ Sets the assumed foreground color of the terminal. T}@T{ T} T{ -query-da1 +query\-da1 T}@T{ bool T}@T{ @@ -559,7 +532,7 @@ Attributes.) T}@T{ T} T{ -columns, lines, pixels-per-column, pixels-per-line +columns, lines, pixels\-per\-column, pixels\-per\-line T}@T{ number T}@T{ @@ -570,37 +543,34 @@ automatically. T}@T{ T} T{ -force-columns, force-lines, force-pixels-per-column, -force-pixels-per-line +force\-columns, force\-lines, force\-pixels\-per\-column, +force\-pixels\-per\-line T}@T{ boolean T}@T{ -Force-set columns, lines, pixels per column, or pixels per line to the +Force\-set columns, lines, pixels per column, or pixels per line to the fallback values provided above. T}@T{ T} .TE .SS Omnirule -.PP -The omni-bar (by default opened with C-l) can be used to perform -searches using omni-rules. -These are to be placed in the table array \f[V][[omnirule]]\f[R]. +The omni\-bar (by default opened with C\-l) can be used to perform +searches using omni\-rules. +These are to be placed in the table array \f[CR][[omnirule]]\f[R]. .PP Examples: .IP -.nf -\f[C] -# Search using DuckDuckGo Lite. (Bound to C-k by default.) +.EX +# Search using DuckDuckGo Lite. (Bound to C\-k by default.) [[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] +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] -# Search using Wikipedia, Firefox-style. +# Search using Wikipedia, Firefox\-style. [[omnirule]] match = \[aq]\[ha]\[at]wikipedia\[aq] -substitute-url = \[aq](x) => \[dq]https://en.wikipedia.org/wiki/Special:Search?search=\[dq] + encodeURIComponent(x.replace(/\[at]wikipedia/, \[dq]\[dq]))\[aq] -\f[R] -.fi +substitute\-url = \[aq](x) => \[dq]https://en.wikipedia.org/wiki/Special:Search?search=\[dq] + encodeURIComponent(x.replace(/\[at]wikipedia/, \[dq]\[dq]))\[aq] +.EE .PP Omnirule options: .PP @@ -628,7 +598,7 @@ rules. T}@T{ T} T{ -substitute-url +substitute\-url T}@T{ JavaScript function T}@T{ @@ -638,15 +608,13 @@ T}@T{ T} .TE .SS Siteconf -.PP Configuration options can be specified for individual sites. -Entries are to be placed in the table array \f[V][[siteconf]]\f[R]. +Entries are to be placed in the table array \f[CR][[siteconf]]\f[R]. .PP Examples: .IP -.nf -\f[C] -# Enable cookies on the orange website for log-in. +.EX +# Enable cookies on the orange website for log\-in. [[siteconf]] url = \[aq]https://news.ycombinator.com/.*\[aq] cookie = true @@ -654,11 +622,11 @@ cookie = true # Redirect npr.org to text.npr.org. [[siteconf]] host = \[aq](www.)?npr.org\[aq] -rewrite-url = \[aq]\[aq]\[aq] +rewrite\-url = \[aq]\[aq]\[aq] (x) => { x.host = \[dq]text.npr.org\[dq]; const s = x.pathname.split(\[aq]/\[aq]); -x.pathname = s.at(s.length > 2 ? -2 : 1); +x.pathname = s.at(s.length > 2 ? \-2 : 1); /* No need to return; URL objects are passed by reference. */ } \[aq]\[aq]\[aq] @@ -667,10 +635,9 @@ x.pathname = s.at(s.length > 2 ? -2 : 1); [[siteconf]] host = \[aq](.*.)?sr.ht\[aq] # either \[aq]something.sr.ht\[aq] or \[aq]sr.ht\[aq] cookie = true # enable cookies -share-cookie-jar = \[aq]sr.ht\[aq] # use the cookie jar of \[aq]sr.ht\[aq] for all matched hosts -third-party-cookie = \[aq].*.sr.ht\[aq] # allow cookies from subdomains -\f[R] -.fi +share\-cookie\-jar = \[aq]sr.ht\[aq] # use the cookie jar of \[aq]sr.ht\[aq] for all matched hosts +third\-party\-cookie = \[aq].*.sr.ht\[aq] # allow cookies from subdomains +.EE .PP Siteconf options: .PP @@ -692,7 +659,7 @@ T}@T{ regex T}@T{ Regular expression used to match the URL. -Either this or the \f[V]host\f[R] option must be specified. +Either this or the \f[CR]host\f[R] option must be specified. Note: regexes are handled according to the match mode regex handling rules. T}@T{ @@ -704,13 +671,13 @@ regex T}@T{ Regular expression used to match the host part of the URL (i.e.\ domain name/ip address.) -Either this or the \f[V]url\f[R] option must be specified. +Either this or the \f[CR]url\f[R] option must be specified. Note: regexes are handled according to the match mode regex handling rules. T}@T{ T} T{ -rewrite-url +rewrite\-url T}@T{ JavaScript function T}@T{ @@ -728,18 +695,18 @@ By default, this is false for all websites. T}@T{ T} T{ -third-party-cookie +third\-party\-cookie T}@T{ array of regexes T}@T{ -Domains for which third-party cookies are allowed on this domain. +Domains for which third\-party cookies are allowed on this domain. Note: this only works for buffers which share the same cookie jar. Note: regexes are handled according to the match mode regex handling rules. T}@T{ T} T{ -share-cookie-jar +share\-cookie\-jar T}@T{ host T}@T{ @@ -748,14 +715,14 @@ Useful for e.g.\ sharing cookies with subdomains. T}@T{ T} T{ -referer-from +referer\-from T}@T{ boolean T}@T{ Whether or not we should send a Referer header when opening requests originating from this domain. Simplified example: if you click a link on a.com that refers to b.com, -and referer-from is true, b.com is sent \[lq]a.com\[rq] as the Referer +and referer\-from is true, b.com is sent \[lq]a.com\[rq] as the Referer header. Defaults to false. T}@T{ @@ -769,12 +736,12 @@ Enable/disable JavaScript execution on this site. T}@T{ T} T{ -document-charset +document\-charset T}@T{ -boolean +charset label string T}@T{ Specify the default encoding for this site. -Overrides document-charset in encoding. +Overrides \f[CR]document\-charset\f[R] in \f[CR][encoding]\f[R]. T}@T{ T} T{ @@ -782,8 +749,8 @@ stylesheet T}@T{ CSS stylesheet T}@T{ -Specify an additional user-stylesheet for this site. -Note: other user-stylesheets (specified under [css] or additional +Specify an additional user\-stylesheet for this site. +Note: other user\-stylesheets (specified under [css] or additional matching siteconfs) are not overridden. (In other words, they will be concatenated with this stylesheet to get the final user stylesheet.) @@ -795,69 +762,81 @@ T}@T{ URL T}@T{ Specify a proxy for network requests fetching contents of this buffer. +Overrides \f[CR]proxy\f[R] in \f[CR][network]\f[R]. T}@T{ T} T{ -default-headers +default\-headers T}@T{ -Table +table T}@T{ Specify a list of default headers for HTTP(S) network requests to this buffer. +Overrides \f[CR]default\-headers\f[R] in \f[CR][network]\f[R]. +T}@T{ +T} +T{ +insecure\-ssl\-no\-verify +T}@T{ +boolean +T}@T{ +Defaults to false. +When set to true, this disables peer and hostname verification for SSL +keys on this site, like \f[CR]curl \-\-insecure\f[R] would. +WARNING: this is insecure, and opens up your connections to +man\-in\-the\-middle attacks. +Please do not use this unless you are absolutely sure you know what you +are doing. T}@T{ T} .TE .SS Stylesheets -.PP -User stylesheets are to be placed in the \f[V][css]\f[R] section. +User stylesheets are to be placed in the \f[CR][css]\f[R] section. .PP There are two ways to import user stylesheets: .IP "1." 3 Include a user stylesheet using the format -\f[V]include = \[aq]path-to-user.css\[aq]\f[R]. +\f[CR]include = \[aq]path\-to\-user.css\[aq]\f[R]. To include multiple stylesheets, use -\f[V]include = [\[aq]first-stylesheet.css, second-stylesheet.css\[aq]]\f[R]. +\f[CR]include = [\[aq]first\-stylesheet.css, second\-stylesheet.css\[aq]]\f[R]. Relative paths are interpreted relative to the config directory. .IP "2." 3 Place your stylesheet directly in your configuration file using -\f[V]inline = \[dq]\[dq]\[dq]your-style\[dq]\[dq]\[dq]\f[R]. +\f[CR]inline = \[dq]\[dq]\[dq]your\-style\[dq]\[dq]\[dq]\f[R]. .SS Keybindings -.PP Keybindings are to be placed in these sections: .IP \[bu] 2 -for pager interaction: \f[V][page]\f[R] +for pager interaction: \f[CR][page]\f[R] .IP \[bu] 2 -for line editing: \f[V][line]\f[R] +for line editing: \f[CR][line]\f[R] .PP Keybindings are configured using the syntax .PP `' = `' .PP -Where \f[V]<keybinding>\f[R] is a combination of unicode characters with -or without modifiers. -Modifiers are the prefixes \f[V]C-\f[R] and \f[V]M-\f[R], which add +Where \f[CR]<keybinding>\f[R] is a combination of unicode characters +with or without modifiers. +Modifiers are the prefixes \f[CR]C\-\f[R] and \f[CR]M\-\f[R], which add control or escape to the keybinding respectively (essentially making -\f[V]M-\f[R] the same as \f[V]C-[\f[R]). +\f[CR]M\-\f[R] the same as \f[CR]C\-[\f[R]). Modifiers can be escaped with the \[ga]\[ga] sign. .PP -\f[V]<action>\f[R] is either a command defined in the \f[V][cmd]\f[R] +\f[CR]<action>\f[R] is either a command defined in the \f[CR][cmd]\f[R] section, or a JavaScript expression. -Here we only describe the pre-defined actions in the default config; for -a description of the API, please see: +Here we only describe the pre\-defined actions in the default config; +for a description of the API, please see: .PP -The API documentation at \f[B]cha-api\f[R](5). +The API documentation at \f[B]cha\-api\f[R](5). .PP Examples: .IP -.nf -\f[C] -# show change URL when Control, Escape and j are pressed -\[aq]C-M-j\[aq] = \[aq]cmd.pager.load\[aq] -# go to the first line of the page when g is pressed twice without a preceding -# number, or to the line when a preceding number is given. +.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.pager.gotoLineOrStart\[aq] -\f[R] -.fi +.EE .SS Browser actions .PP .TS @@ -871,13 +850,13 @@ T}@T{ T} _ T{ -\f[V]cmd.pager.quit\f[R] +\f[CR]cmd.pager.quit\f[R] T}@T{ Exit the browser. T}@T{ T} T{ -\f[V]cmd.pager.suspend\f[R] +\f[CR]cmd.pager.suspend\f[R] T}@T{ Temporarily suspend the browser Note: this also suspends e.g.\ buffer processes or CGI scripts. @@ -887,11 +866,10 @@ T}@T{ T} .TE .SS Pager actions -.PP -Note: \f[V]n\f[R] in the following text refers to a number preceding the -action. +Note: \f[CR]n\f[R] in the following text refers to a number preceding +the action. e.g. -in \f[V]10gg\f[R], n = 10. +in \f[CR]10gg\f[R], n = 10. If no preceding number is input, then it is left unspecified. .PP .TS @@ -905,155 +883,156 @@ T}@T{ T} _ T{ -\f[V]cmd.pager.cursorUp\f[R] +\f[CR]cmd.pager.cursorUp\f[R] T}@T{ Move the cursor upwards by n lines, or if n is unspecified, by 1. T}@T{ T} T{ -\f[V]cmd.pager.cursorDown\f[R] +\f[CR]cmd.pager.cursorDown\f[R] T}@T{ Move the cursor downwards by n lines, or if n is unspecified, by 1. T}@T{ T} T{ -\f[V]cmd.pager.cursorLeft\f[R] +\f[CR]cmd.pager.cursorLeft\f[R] T}@T{ Move the cursor to the left by n cells, or if n is unspecified, by 1. T}@T{ T} T{ -\f[V]cmd.pager.cursorRight\f[R] +\f[CR]cmd.pager.cursorRight\f[R] T}@T{ Move the cursor to the right by n cells, or if n is unspecified, by 1. T}@T{ T} T{ -\f[V]cmd.pager.cursorLineBegin\f[R] +\f[CR]cmd.pager.cursorLineBegin\f[R] T}@T{ Move the cursor to the first cell of the line. T}@T{ T} T{ -\f[V]cmd.pager.cursorLineTextStart\f[R] +\f[CR]cmd.pager.cursorLineTextStart\f[R] T}@T{ -Move the cursor to the first non-blank character of the line. +Move the cursor to the first non\-blank character of the line. T}@T{ T} T{ -\f[V]cmd.pager.cursorLineEnd\f[R] +\f[CR]cmd.pager.cursorLineEnd\f[R] T}@T{ Move the cursor to the last cell of the line. T}@T{ T} T{ -\f[V]cmd.pager.cursorNextWord\f[R], -\f[V]cmd.pager.cursorNextViWord\f[R], -\f[V]cmd.pager.cursorNextBigWord\f[R] +\f[CR]cmd.pager.cursorNextWord\f[R], +\f[CR]cmd.pager.cursorNextViWord\f[R], +\f[CR]cmd.pager.cursorNextBigWord\f[R] T}@T{ Move the cursor to the beginning of the next word. T}@T{ T} T{ -\f[V]cmd.pager.cursorPrevWord\f[R], -\f[V]cmd.pager.cursorPrevViWord\f[R], -\f[V]cmd.pager.cursorPrevBigWord\f[R] +\f[CR]cmd.pager.cursorPrevWord\f[R], +\f[CR]cmd.pager.cursorPrevViWord\f[R], +\f[CR]cmd.pager.cursorPrevBigWord\f[R] T}@T{ Move the cursor to the end of the previous word. T}@T{ T} T{ -\f[V]cmd.pager.cursorWordEnd\f[R], \f[V]cmd.pager.cursorViWordEnd\f[R], -\f[V]cmd.pager.cursorBigWordEnd\f[R] +\f[CR]cmd.pager.cursorWordEnd\f[R], +\f[CR]cmd.pager.cursorViWordEnd\f[R], +\f[CR]cmd.pager.cursorBigWordEnd\f[R] T}@T{ Move the cursor to the end of the current word, or if already there, to the end of the next word. T}@T{ T} T{ -\f[V]cmd.pager.cursorWordBegin\f[R], -\f[V]cmd.pager.cursorViWordBegin\f[R], -\f[V]cmd.pager.cursorBigWordBegin\f[R] +\f[CR]cmd.pager.cursorWordBegin\f[R], +\f[CR]cmd.pager.cursorViWordBegin\f[R], +\f[CR]cmd.pager.cursorBigWordBegin\f[R] T}@T{ Move the cursor to the beginning of the current word, or if already there, to the end of the previous word. T}@T{ T} T{ -\f[V]cmd.pager.cursorPrevLink\f[R] +\f[CR]cmd.pager.cursorPrevLink\f[R] T}@T{ Move the cursor to the beginning of the previous clickable element. T}@T{ T} T{ -\f[V]cmd.pager.cursorNextLink\f[R] +\f[CR]cmd.pager.cursorNextLink\f[R] T}@T{ Move the cursor to the beginning of the next clickable element. T}@T{ T} T{ -\f[V]cmd.pager.cursorPrevParagraph\f[R] +\f[CR]cmd.pager.cursorPrevParagraph\f[R] T}@T{ Move the cursor to the beginning of the nth next paragraph. T}@T{ T} T{ -\f[V]cmd.pager.cursorNextParagraph\f[R] +\f[CR]cmd.pager.cursorNextParagraph\f[R] T}@T{ Move the cursor to the end of the nth previous paragraph. T}@T{ T} T{ -\f[V]cmd.pager.cursorRevNthLink\f[R] +\f[CR]cmd.pager.cursorRevNthLink\f[R] T}@T{ Move the cursor to the nth link of the document, counting backwards from the document\[cq]s last line. T}@T{ T} T{ -\f[V]cmd.pager.cursorNthLink\f[R] +\f[CR]cmd.pager.cursorNthLink\f[R] T}@T{ Move the cursor to the nth link of the document. T}@T{ T} T{ -\f[V]cmd.pager.pageUp\f[R], \f[V]cmd.pager.pageDown\f[R], -\f[V]cmd.pager.pageLeft\f[R], \f[V]cmd.pager.pageRight\f[R] +\f[CR]cmd.pager.pageUp\f[R], \f[CR]cmd.pager.pageDown\f[R], +\f[CR]cmd.pager.pageLeft\f[R], \f[CR]cmd.pager.pageRight\f[R] T}@T{ Scroll up/down/left/right by n pages, or if n is unspecified, by one page. T}@T{ T} T{ -\f[V]cmd.pager.halfPageUp\f[R], \f[V]cmd.pager.halfPageDown\f[R], -\f[V]cmd.pager.halfPageLeft\f[R], \f[V]pager.halfPageUp\f[R] +\f[CR]cmd.pager.halfPageUp\f[R], \f[CR]cmd.pager.halfPageDown\f[R], +\f[CR]cmd.pager.halfPageLeft\f[R], \f[CR]pager.halfPageUp\f[R] T}@T{ Scroll up/down/left/right by n half pages, or if n is unspecified, by one page. T}@T{ T} T{ -\f[V]cmd.pager.scrollUp\f[R], \f[V]cmd.pager.scrollDown\f[R], -\f[V]cmd.pager.scrollLeft\f[R], \f[V]cmd.pager.scrollRight\f[R] +\f[CR]cmd.pager.scrollUp\f[R], \f[CR]cmd.pager.scrollDown\f[R], +\f[CR]cmd.pager.scrollLeft\f[R], \f[CR]cmd.pager.scrollRight\f[R] T}@T{ Scroll up/down/left/right by n lines, or if n is unspecified, by one line. T}@T{ T} T{ -\f[V]cmd.pager.click\f[R] +\f[CR]cmd.pager.click\f[R] T}@T{ Click the HTML element currently under the cursor. T}@T{ T} T{ -\f[V]cmd.pager.load\f[R] +\f[CR]cmd.pager.load\f[R] T}@T{ Open the current address in the URL bar. T}@T{ T} T{ -\f[V]cmd.pager.webSearch\f[R] +\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. @@ -1062,13 +1041,13 @@ company or their product in any way.) T}@T{ T} T{ -\f[V]cmd.pager.dupeBuffer\f[R] +\f[CR]cmd.pager.dupeBuffer\f[R] T}@T{ Duplicate the current buffer by loading its source to a new buffer. T}@T{ T} T{ -\f[V]cmd.pager.discardBuffer\f[R] +\f[CR]cmd.pager.discardBuffer\f[R] T}@T{ Discard the current buffer, and move back to its previous sibling buffer, or if that doesn\[cq]t exist, to its parent. @@ -1077,217 +1056,218 @@ the next sibling buffer instead. T}@T{ T} T{ -\f[V]cmd.pager.discardTree\f[R] +\f[CR]cmd.pager.discardTree\f[R] T}@T{ Discard all child buffers of the current buffer. T}@T{ T} T{ -\f[V]cmd.pager.reload\f[R] +\f[CR]cmd.pager.reload\f[R] T}@T{ Open a new buffer with the current buffer\[cq]s URL, replacing the current buffer. T}@T{ T} T{ -\f[V]cmd.pager.reshape\f[R] +\f[CR]cmd.pager.reshape\f[R] T}@T{ Reshape the current buffer (=render the current page anew.) T}@T{ T} T{ -\f[V]cmd.pager.redraw\f[R] +\f[CR]cmd.pager.redraw\f[R] T}@T{ Redraw screen contents. Useful if something messed up the display. T}@T{ T} T{ -\f[V]cmd.pager.toggleSource\f[R] +\f[CR]cmd.pager.toggleSource\f[R] T}@T{ If viewing an HTML buffer, open a new buffer with its source. Otherwise, open the current buffer\[cq]s contents as HTML. T}@T{ T} T{ -\f[V]cmd.pager.cursorFirstLine\f[R], \f[V]cmd.pager.cursorLastLine\f[R] +\f[CR]cmd.pager.cursorFirstLine\f[R], +\f[CR]cmd.pager.cursorLastLine\f[R] T}@T{ Move to the beginning/end in the buffer. T}@T{ T} T{ -\f[V]cmd.pager.cursorTop\f[R] +\f[CR]cmd.pager.cursorTop\f[R] T}@T{ Move to the first line on the screen. (Equivalent to H in vi.) T}@T{ T} T{ -\f[V]cmd.pager.cursorMiddle\f[R] +\f[CR]cmd.pager.cursorMiddle\f[R] T}@T{ Move to the line in the middle of the screen. (Equivalent to M in vi.) T}@T{ T} T{ -\f[V]cmd.pager.cursorBottom\f[R] +\f[CR]cmd.pager.cursorBottom\f[R] T}@T{ Move to the last line on the screen. (Equivalent to L in vi.) T}@T{ T} T{ -\f[V]cmd.pager.raisePage\f[R], \f[V]cmd.pager.raisePageBegin\f[R], -\f[V]cmd.pager.centerLine\f[R], \f[V]cmd.pager.centerLineBegin\f[R], -\f[V]cmd.pager.lowerPage\f[R], \f[V]cmd.pager.lowerPageBegin\f[R] +\f[CR]cmd.pager.raisePage\f[R], \f[CR]cmd.pager.raisePageBegin\f[R], +\f[CR]cmd.pager.centerLine\f[R], \f[CR]cmd.pager.centerLineBegin\f[R], +\f[CR]cmd.pager.lowerPage\f[R], \f[CR]cmd.pager.lowerPageBegin\f[R] T}@T{ -If n is specified, move cursor to line n.\ Then, * \f[V]raisePage\f[R] +If n is specified, move cursor to line n.\ Then, * \f[CR]raisePage\f[R] scrolls down so that the cursor is on the top line of the screen. -(vi \f[V]z<CR>\f[R], vim \f[V]zt\f[R].) -* \f[V]centerLine\f[R] shifts the screen so that the cursor is in the +(vi \f[CR]z<CR>\f[R], vim \f[CR]zt\f[R].) +* \f[CR]centerLine\f[R] shifts the screen so that the cursor is in the middle of the screen. -(vi \f[V]z.\f[R], vim \f[V]zz\f[R].) -* \f[V]lowerPage\f[R] scrolls up so that the cursor is on the bottom +(vi \f[CR]z.\f[R], vim \f[CR]zz\f[R].) +* \f[CR]lowerPage\f[R] scrolls up so that the cursor is on the bottom line of the screen. -(vi \f[V]z-\f[R], vim \f[V]zb\f[R].) -The -\f[V]Begin\f[R] variants also move the cursor to the line\[cq]s -first non-blank character, as the variants originating from vi do. +(vi \f[CR]z\-\f[R], vim \f[CR]zb\f[R].) +The \-\f[CR]Begin\f[R] variants also move the cursor to the line\[cq]s +first non\-blank character, as the variants originating from vi do. T}@T{ T} T{ -\f[V]cmd.pager.nextPageBegin\f[R] +\f[CR]cmd.pager.nextPageBegin\f[R] T}@T{ If n is specified, move to the screen before the nth line and raise the page. Otherwise, go to the previous screen\[cq]s last line and raise the page. -(\f[V]z+\f[R] in vi.) +(\f[CR]z+\f[R] in vi.) T}@T{ T} T{ -\f[V]cmd.pager.previousPageBegin\f[R] +\f[CR]cmd.pager.previousPageBegin\f[R] T}@T{ If n is specified, move to the screen before the nth line and raise the page. Otherwise, go to the previous screen\[cq]s last line and raise the page. -(\f[V]z+\f[R] in vi.) +(\f[CR]z+\f[R] in vi.) T}@T{ T} T{ -\f[V]cmd.pager.cursorLeftEdge\f[R], -\f[V]cmd.pager.cursorMiddleColumn\f[R], -\f[V]cmd.pager.cursorRightEdge\f[R] +\f[CR]cmd.pager.cursorLeftEdge\f[R], +\f[CR]cmd.pager.cursorMiddleColumn\f[R], +\f[CR]cmd.pager.cursorRightEdge\f[R] T}@T{ Move to the first/middle/last column on the screen. T}@T{ T} T{ -\f[V]cmd.pager.centerColumn\f[R] +\f[CR]cmd.pager.centerColumn\f[R] T}@T{ Center screen around the current column. -(w3m \f[V]Z\f[R].) +(w3m \f[CR]Z\f[R].) T}@T{ T} T{ -\f[V]cmd.pager.lineInfo\f[R] +\f[CR]cmd.pager.lineInfo\f[R] T}@T{ Display information about the current line on the status line. T}@T{ T} T{ -\f[V]cmd.pager.searchForward\f[R], \f[V]cmd.pager.searchBackward\f[R] +\f[CR]cmd.pager.searchForward\f[R], \f[CR]cmd.pager.searchBackward\f[R] T}@T{ Search for a string in the current buffer, forwards or backwards. T}@T{ T} T{ -\f[V]cmd.pager.isearchForward\f[R], \f[V]cmd.pager.searchBackward\f[R] +\f[CR]cmd.pager.isearchForward\f[R], \f[CR]cmd.pager.searchBackward\f[R] T}@T{ -Incremental-search for a string, highlighting the first result, forwards -or backwards. +Incremental\-search for a string, highlighting the first result, +forwards or backwards. T}@T{ T} T{ -\f[V]cmd.pager.gotoLineOrStart\f[R], \f[V]cmd.pager.gotoLineOrEnd\f[R] +\f[CR]cmd.pager.gotoLineOrStart\f[R], \f[CR]cmd.pager.gotoLineOrEnd\f[R] T}@T{ If n is specified, jump to line n.\ Otherwise, jump to the start/end of the page. T}@T{ T} T{ -\f[V]cmd.pager.searchNext\f[R], \f[V]cmd.pager.searchPrev\f[R] +\f[CR]cmd.pager.searchNext\f[R], \f[CR]cmd.pager.searchPrev\f[R] T}@T{ Jump to the nth (or if unspecified, first) next/previous search result. T}@T{ T} T{ -\f[V]cmd.pager.peek\f[R] +\f[CR]cmd.pager.peek\f[R] T}@T{ Display a message of the current buffer\[cq]s URL on the status line. T}@T{ T} T{ -\f[V]cmd.pager.peekCursor\f[R] +\f[CR]cmd.pager.peekCursor\f[R] T}@T{ Display a message of the URL or title under the cursor on the status line. Multiple calls allow cycling through the two. -(i.e.\ by default, press u once -> title, press again -> URL) +(i.e.\ by default, press u once \-> title, press again \-> URL) T}@T{ T} T{ -\f[V]cmd.pager.setMark\f[R] +\f[CR]cmd.pager.setMark\f[R] T}@T{ -Wait for a character \f[V]x\f[R] and then set a mark with the ID -\f[V]x\f[R]. +Wait for a character \f[CR]x\f[R] and then set a mark with the ID +\f[CR]x\f[R]. T}@T{ T} T{ -\f[V]cmd.pager.gotoMark\f[R], \f[V]cmd.pager.gotoMarkY\f[R] +\f[CR]cmd.pager.gotoMark\f[R], \f[CR]cmd.pager.gotoMarkY\f[R] T}@T{ -Wait for a character \f[V]x\f[R] and then jump to the mark with the ID -\f[V]x\f[R] (if it exists on the page). -\f[V]gotoMark\f[R] sets both the X and Y positions; gotoMarkY only sets +Wait for a character \f[CR]x\f[R] and then jump to the mark with the ID +\f[CR]x\f[R] (if it exists on the page). +\f[CR]gotoMark\f[R] sets both the X and Y positions; gotoMarkY only sets the Y position. T}@T{ T} T{ -\f[V]cmd.pager.markURL\f[R] +\f[CR]cmd.pager.markURL\f[R] T}@T{ -Convert URL-like strings to anchors on the current page. +Convert URL\-like strings to anchors on the current page. T}@T{ T} T{ -\f[V]cmd.pager.saveLink\f[R] +\f[CR]cmd.pager.saveLink\f[R] T}@T{ Save resource from the URL pointed to by the cursor to the disk. T}@T{ T} T{ -\f[V]cmd.pager.saveSource\f[R] +\f[CR]cmd.pager.saveSource\f[R] T}@T{ Save the source of the current buffer to the disk. T}@T{ T} T{ -\f[V]cmd.pager.copyURL\f[R] +\f[CR]cmd.pager.copyURL\f[R] T}@T{ Copy the current buffer\[cq]s URL to the system clipboard. T}@T{ T} T{ -\f[V]cmd.pager.copyCursorLink\f[R] +\f[CR]cmd.pager.copyCursorLink\f[R] T}@T{ Copy the link under the cursor to the system clipboard. T}@T{ T} T{ -\f[V]cmd.pager.copyCursorImage\f[R] +\f[CR]cmd.pager.copyCursorImage\f[R] T}@T{ Copy the URL of the image under the cursor to the system clipboard. T}@T{ T} .TE -.SS Line-editing actions +.SS Line\-editing actions .PP .TS tab(@); @@ -1300,103 +1280,103 @@ T}@T{ T} _ T{ -\f[V]cmd.line.submit\f[R] +\f[CR]cmd.line.submit\f[R] T}@T{ Submit line T}@T{ T} T{ -\f[V]cmd.line.cancel\f[R] +\f[CR]cmd.line.cancel\f[R] T}@T{ Cancel operation T}@T{ T} T{ -\f[V]cmd.line.backspace\f[R] +\f[CR]cmd.line.backspace\f[R] T}@T{ Delete character before cursor T}@T{ T} T{ -\f[V]cmd.line.delete\f[R] +\f[CR]cmd.line.delete\f[R] T}@T{ Delete character after cursor T}@T{ T} T{ -\f[V]cmd.line.clear\f[R] +\f[CR]cmd.line.clear\f[R] T}@T{ Clear text before cursor T}@T{ T} T{ -\f[V]cmd.line.kill\f[R] +\f[CR]cmd.line.kill\f[R] T}@T{ Clear text after cursor T}@T{ T} T{ -\f[V]cmd.line.clearWord\f[R] +\f[CR]cmd.line.clearWord\f[R] T}@T{ Delete word before cursor T}@T{ T} T{ -\f[V]cmd.line.killWord\f[R] +\f[CR]cmd.line.killWord\f[R] T}@T{ Delete word after cursor T}@T{ T} T{ -\f[V]cmd.line.backward\f[R] +\f[CR]cmd.line.backward\f[R] T}@T{ Move cursor back by one character T}@T{ T} T{ -\f[V]cmd.line.forward\f[R] +\f[CR]cmd.line.forward\f[R] T}@T{ Move cursor forward by one character T}@T{ T} T{ -\f[V]cmd.line.prevWord\f[R] +\f[CR]cmd.line.prevWord\f[R] T}@T{ Move cursor to the previous word by one character T}@T{ T} T{ -\f[V]cmd.line.nextWord\f[R] +\f[CR]cmd.line.nextWord\f[R] T}@T{ Move cursor to the previous word by one character T}@T{ T} T{ -\f[V]cmd.line.begin\f[R] +\f[CR]cmd.line.begin\f[R] T}@T{ Move cursor to the previous word by one character T}@T{ T} T{ -\f[V]cmd.line.end\f[R] +\f[CR]cmd.line.end\f[R] T}@T{ Move cursor to the previous word by one character T}@T{ T} T{ -\f[V]cmd.line.escape\f[R] +\f[CR]cmd.line.escape\f[R] T}@T{ Ignore keybindings for next character T}@T{ T} T{ -\f[V]cmd.line.prevHist\f[R] +\f[CR]cmd.line.prevHist\f[R] T}@T{ Jump to the previous history entry T}@T{ T} T{ -\f[V]cmd.line.nextHist\f[R] +\f[CR]cmd.line.nextHist\f[R] T}@T{ Jump to the next history entry T}@T{ @@ -1406,23 +1386,20 @@ T} Note: to facilitate URL editing, the line editor has a different definition of what a word is than the pager. For the line editor, a word is either a sequence of alphanumeric -characters, or any single non-alphanumeric character. -(This means that e.g.\ \f[V]https://\f[R] consists of four words: -\f[V]https\f[R], \f[V]:\f[R], \f[V]/\f[R] and \f[V]/\f[R].) +characters, or any single non\-alphanumeric character. +(This means that e.g.\ \f[CR]https://\f[R] consists of four words: +\f[CR]https\f[R], \f[CR]:\f[R], \f[CR]/\f[R] and \f[CR]/\f[R].) .IP -.nf -\f[C] +.EX # Control+A moves the cursor to the beginning of the line. -\[aq]C-a\[aq] = \[aq]cmd.line.begin\[aq] +\[aq]C\-a\[aq] = \[aq]cmd.line.begin\[aq] -# Escape+D deletes everything after the cursor until it reaches a word-breaking +# Escape+D deletes everything after the cursor until it reaches a word\-breaking # character. -\[aq]M-d\[aq] = \[aq]cmd.line.killWord\[aq] -\f[R] -.fi +\[aq]M\-d\[aq] = \[aq]cmd.line.killWord\[aq] +.EE .SS Appendix .SS Regex handling -.PP Regular expressions are currently handled using libregexp which is included in QuickJS. This means that all regular expressions work as in JavaScript. @@ -1431,70 +1408,66 @@ There are two different modes of regex preprocessing in Chawan: \[lq]search\[rq] mode, and \[lq]match\[rq] mode. \[lq]match\[rq] mode is used for configurations (meaning in all values in this document described as \[lq]regex\[rq]). -\[lq]search\[rq] mode is used for the on-page search function (using +\[lq]search\[rq] mode is used for the on\-page search function (using searchForward/isearchForward etc.) .SS Match mode -.PP Regular expressions are assumed to be exact matches, except when they start with a caret (\[ha]) sign or end with an unescaped dollar ($) sign. .PP In other words, the following transformations occur: .IP -.nf -\f[C] -\[ha]abcd -> \[ha]abcd (no change, only beginning is matched) -efgh$ -> efgh$ (no change, only end is matched) -\[ha]ijkl$ -> \[ha]ijkl$ (no change, the entire line is matched) -mnop -> \[ha]mnop$ (changed to exact match, the entire line is matched) -\f[R] -.fi +.EX +\[ha]abcd \-> \[ha]abcd (no change, only beginning is matched) +efgh$ \-> efgh$ (no change, only end is matched) +\[ha]ijkl$ \-> \[ha]ijkl$ (no change, the entire line is matched) +mnop \-> \[ha]mnop$ (changed to exact match, the entire line is matched) +.EE .PP -Match mode has no way to toggle JavaScript regex flags like \f[V]i\f[R]. +Match mode has no way to toggle JavaScript regex flags like +\f[CR]i\f[R]. .SS Search mode -.PP -For on-page search, the above transformations do not apply; the search -\f[V]/abcd\f[R] searches for the string \f[V]abcd\f[R] inside all lines. +For on\-page search, the above transformations do not apply; the search +\f[CR]/abcd\f[R] searches for the string \f[CR]abcd\f[R] inside all +lines. .PP \[lq]Search\[rq] mode also has some other convenience transformations: .IP \[bu] 2 -The string \f[V]c\f[R] (backslash + lower-case c) inside a search-mode -regex enables case-insensitive matching. +The string \f[CR]c\f[R] (backslash + lower\-case c) inside a +search\-mode regex enables case\-insensitive matching. .IP \[bu] 2 -Conversely, \f[V]C\f[R] (backslash + capital C) disables -case-insensitive matching. -(Useful if you have the \[lq]i\[rq] flag inside default-flags.) +Conversely, \f[CR]C\f[R] (backslash + capital C) disables +case\-insensitive matching. +(Useful if you have the \[lq]i\[rq] flag inside default\-flags.) .IP \[bu] 2 -\f[V]<\f[R] and \f[V]>\f[R] is converted to \f[V]b\f[R] (as in vi, grep, -etc.) +\f[CR]<\f[R] and \f[CR]>\f[R] is converted to \f[CR]b\f[R] (as in vi, +grep, etc.) .PP Note that none of these work in \[lq]match\[rq] mode. .SS Path handling -.PP Rules for path handling are similar to how strings in the shell are handled. .IP \[bu] 2 -Tilde-expansion is used to determine the user\[cq]s home directory. -So e.g.\ \f[V]\[ti]/whatever\f[R] works. +Tilde\-expansion is used to determine the user\[cq]s home directory. +So e.g.\ \f[CR]\[ti]/whatever\f[R] works. .IP \[bu] 2 -Environment variables can be used like \f[V]$ENV_VAR\f[R]. +Environment variables can be used like \f[CR]$ENV_VAR\f[R]. .IP \[bu] 2 Relative paths are relative to the Chawan configuration directory. .PP -Some non-external variables are also defined by Chawan. -These can be accessed using the syntax \f[V]${%VARIABLE}\f[R]: +Some non\-external variables are also defined by Chawan. +These can be accessed using the syntax \f[CR]${%VARIABLE}\f[R]: .IP \[bu] 2 -\f[V]${%CHA_BIN_DIR}\f[R]: the directory which the \f[V]cha\f[R] binary -resides in. +\f[CR]${%CHA_BIN_DIR}\f[R]: the directory which the \f[CR]cha\f[R] +binary resides in. Note that symbolic links are automatically resolved to determine this path. .IP \[bu] 2 -\f[V]${%CHA_LIBEXEC_DIR}\f[R]: the directory for all executables Chawan +\f[CR]${%CHA_LIBEXEC_DIR}\f[R]: the directory for all executables Chawan uses for operation. -By default, this is \f[V]${%CHA_BIN_DIR}/../libexec/chawan\f[R]. +By default, this is \f[CR]${%CHA_BIN_DIR}/../libexec/chawan\f[R]. .SS Word types -.PP -Word-based pager commands can operate with different definitions of +Word\-based pager commands can operate with different definitions of words. Currently, these are: .IP \[bu] 2 @@ -1504,29 +1477,23 @@ vi words .IP \[bu] 2 Big words .SS w3m word -.PP A w3m word is a sequence of alphanumeric characters. Symbols are treated in the same way as whitespace. .SS vi word -.PP A vi word is a sequence of alphanumeric characters, OR a sequence of symbols. .PP vi words may be separated by whitespace; however, symbolic and -alphanumeric vi words do not have to be whitespace-separated. +alphanumeric vi words do not have to be whitespace\-separated. e.g.\ following character sequence contains two words: .IP -.nf -\f[C] +.EX hello[]+{}\[at]\[ga]! -\f[R] -.fi +.EE .SS Big word -.PP -A big word is a sequence of non-whitespace characters. +A big word is a sequence of non\-whitespace characters. .PP It is essentially the same as a w3m word, but with symbols being defined -as non-whitespace. +as non\-whitespace. .SS See also -.PP \f[B]cha\f[R](1) diff --git a/doc/config.md b/doc/config.md index d2f75752..f1968504 100644 --- a/doc/config.md +++ b/doc/config.md @@ -334,7 +334,7 @@ supported by cURL may be used. Can be overridden by siteconf.</td> <tr> <td>default-headers</td> -<td>Table</td> +<td>table</td> <td>Specify a list of default headers for all HTTP(S) network requests. Can be overridden by siteconf.</td> </tr> @@ -631,9 +631,9 @@ Defaults to false. <tr> <td>document-charset</td> -<td>boolean</td> -<td>Specify the default encoding for this site. Overrides document-charset -in [encoding].</td> +<td>charset label string</td> +<td>Specify the default encoding for this site. Overrides `document-charset` +in `[encoding]`.</td> </tr> <tr> @@ -648,14 +648,25 @@ with this stylesheet to get the final user stylesheet.)</td> <tr> <td>proxy</td> <td>URL</td> -<td>Specify a proxy for network requests fetching contents of this buffer.</td> +<td>Specify a proxy for network requests fetching contents of this buffer. +Overrides `proxy` in `[network]`.</td> </tr> <tr> <td>default-headers</td> -<td>Table</td> +<td>table</td> <td>Specify a list of default headers for HTTP(S) network requests to this -buffer.</td> +buffer. Overrides `default-headers` in `[network]`.</td> +</tr> + +<tr> +<td>insecure-ssl-no-verify</td> +<td>boolean</td> +<td>Defaults to false. When set to true, this disables peer and hostname +verification for SSL keys on this site, like `curl --insecure` would.<br> +WARNING: this is insecure, and opens up your connections to man-in-the-middle +attacks. Please do not use this unless you are absolutely sure you know what you +are doing.</td> </tr> </table> |