diff options
-rw-r--r-- | doc/cha-config.5 | 59 | ||||
-rw-r--r-- | doc/cha-protocols.5 | 251 | ||||
-rw-r--r-- | doc/config.md | 54 | ||||
-rw-r--r-- | res/config.toml | 4 |
4 files changed, 159 insertions, 209 deletions
diff --git a/doc/cha-config.5 b/doc/cha-config.5 index 2466c3de..1fb0a804 100644 --- a/doc/cha-config.5 +++ b/doc/cha-config.5 @@ -194,6 +194,15 @@ Directory used to save temporary files. T}@T{ T} T{ +sockdir +T}@T{ +path +T}@T{ +Directory used to store UNIX domain sockets used for inter\-process +communication. +T}@T{ +T} +T{ editor T}@T{ shell command @@ -874,27 +883,17 @@ T}@T{ T} _ T{ -\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[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[CR]cmd.pager.cursorLeft\f[R] +\f[CR]cmd.pager.cursorUp\f[R], \f[CR]cmd.pager.cursorDown\f[R] T}@T{ -Move the cursor to the left by n cells, or if n is unspecified, by 1. +Move the cursor upwards/downwards by n lines, or if n is unspecified, by +1. T}@T{ T} T{ -\f[CR]cmd.pager.cursorRight\f[R] +\f[CR]cmd.pager.cursorLeft\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. +Move the cursor to the left/right by n cells, or if n is unspecified, by +1. T}@T{ T} T{ @@ -950,27 +949,17 @@ there, to the end of the previous word. T}@T{ T} T{ -\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[CR]cmd.pager.cursorNextLink\f[R] -T}@T{ -Move the cursor to the beginning of the next clickable element. -T}@T{ -T} -T{ -\f[CR]cmd.pager.cursorPrevParagraph\f[R] +\f[CR]cmd.pager.cursorPrevLink\f[R], \f[CR]cmd.pager.cursorNextLink\f[R] T}@T{ -Move the cursor to the beginning of the nth next paragraph. +Move the cursor to the end/beginning of the previous/next clickable +element (e.g.\ link, input field, etc). T}@T{ T} T{ +\f[CR]cmd.pager.cursorPrevParagraph\f[R], \f[CR]cmd.pager.cursorNextParagraph\f[R] T}@T{ -Move the cursor to the end of the nth previous paragraph. +Move the cursor to the end/beginning of the nth previous/next paragraph. T}@T{ T} T{ @@ -1387,7 +1376,8 @@ search\-mode regex enables case\-insensitive matching. .IP \[bu] 2 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.) +(Useful if you have \f[CR]ignore\-case\f[R] set to true, which is the +default.) .IP \[bu] 2 \f[CR]<\f[R] and \f[CR]>\f[R] is converted to \f[CR]b\f[R] (as in vi, grep, etc.) @@ -1404,8 +1394,9 @@ 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[CR]${%VARIABLE}\f[R]: +Some internal variables are also defined by Chawan. +These can be accessed using the non\-standard syntax +\f[CR]${%VARIABLE}\f[R]: .IP \[bu] 2 \f[CR]${%CHA_BIN_DIR}\f[R]: the directory which the \f[CR]cha\f[R] binary resides in. diff --git a/doc/cha-protocols.5 b/doc/cha-protocols.5 index 202fd991..a5299ea9 100644 --- a/doc/cha-protocols.5 +++ b/doc/cha-protocols.5 @@ -1,55 +1,39 @@ -.\" Automatically generated by Pandoc 2.17.1.1 +.\" Automatically generated by Pandoc 3.1.13 .\" -.\" 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-protocols" "5" "" "" "Protocol support in Chawan" -.hy +.TH "cha\-protocols" "5" "" "" "Protocol support in Chawan" .SH Protocols -.PP Chawan supports downloading resources from various protocols: HTTP, FTP, Gopher, Gemini, and Finger. Details on these protocols, and information on how users can add support to their preferred protocols is outlined in this document. .SS HTTP -.PP HTTP/s support is based on libcurl; supported features largely depend on your libcurl version. -The adapter is found at \f[V]adapter/protocol/http.nim\f[R]. +The adapter is found at \f[CR]adapter/protocol/http.nim\f[R]. .PP The libcurl HTTP adapter can take arbitrary headers and POST data, is able to use passed userinfo data -(\f[V]https://username:password\[at]example.org\f[R]), and returns all +(\f[CR]https://username:password\[at]example.org\f[R]), and returns all headers and response body it receives from libcurl without exception. .PP -It is possible to build these adapters using -curl-impersonate (https://github.com/lwthiker/curl-impersonate) by -setting the compile-time variable CURLLIBNAME to -\f[V]libcurl-impersonate.so\f[R]. -Note that for curl-impersonate to work, you must set -\f[V]network.default-headers = {}\f[R] in the Chawan config. -(Otherwise, the libcurl adapter will happily override curl-impersonate +It is possible to build these adapters using \c +.UR https://github.com/lwthiker/curl-impersonate +curl\-impersonate +.UE \c +\ by setting the compile\-time variable CURLLIBNAME to +\f[CR]libcurl\-impersonate.so\f[R]. +Note that for curl\-impersonate to work, you must set +\f[CR]network.default\-headers = {}\f[R] in the Chawan config. +(Otherwise, the libcurl adapter will happily override curl\-impersonate headers, which is probably not what you want.) .PP -The \f[V]bonus/libfetch\f[R] directory contains an alternative HTTP +The \f[CR]bonus/libfetch\f[R] directory contains an alternative HTTP client, which is based on FreeBSD libfetch. It is mostly a proof of concept, as FreeBSD libfetch HTTP support is very limited; in particular, it does not support HTTP headers (beyond some basic request headers), so e.g.\ cookies will not work. .SS FTP -.PP -Chawan supports FTP through the \f[V]adapter/protocol/ftp.nim\f[R] +Chawan supports FTP through the \f[CR]adapter/protocol/ftp.nim\f[R] libcurl adapter. For directory listings, it assumes UNIX output style, and will probably break horribly on receiving anything else. @@ -64,22 +48,20 @@ Also, settings covered by the Match field are ignored. .PP In theory, FTPS should work too, but it is completely untested. .SS Gopher -.PP -Gopher is supported through the \f[V]adapter/protocol/gopher.nim\f[R] +Gopher is supported through the \f[CR]adapter/protocol/gopher.nim\f[R] libcurl adapter. -Gopher directories are passed as the \f[V]text/gopher\f[R] type, and -\f[V]adapter/format/gopher.nim\f[R] takes care of converting this to +Gopher directories are passed as the \f[CR]text/gopher\f[R] type, and +\f[CR]adapter/format/gopher.nim\f[R] takes care of converting this to HTML. .PP Gopher selector types are converted to MIME types when possible; note -however, that this is very limited, as most of them (like \f[V]s\f[R] -sound, or \f[V]I\f[R] image) cannot be unambiguously converted without +however, that this is very limited, as most of them (like \f[CR]s\f[R] +sound, or \f[CR]I\f[R] image) cannot be unambiguously converted without some other sniffing method. -Chawan will fall back to extension-based detection in these cases, and -in the worst case may end up with \f[V]application/octet-stream\f[R]. +Chawan will fall back to extension\-based detection in these cases, and +in the worst case may end up with \f[CR]application/octet\-stream\f[R]. .SS Gemini -.PP -Chawan\[cq]s gemini adapter (in \f[V]adapter/protocol/gmifetch.c\f[R]) +Chawan\[cq]s gemini adapter (in \f[CR]adapter/protocol/gmifetch.c\f[R]) is a C program. It requires OpenSSL to work. .PP @@ -89,104 +71,99 @@ It does not support proxies yet. .IP \[bu] 2 It does not support sites that require private key authentication. .PP -\f[V]adapter/format/gmi2html.nim\f[R] is its companion program to -convert the \f[V]text/gemini\f[R] file format to HTML. +\f[CR]adapter/format/gmi2html.nim\f[R] is its companion program to +convert the \f[CR]text/gemini\f[R] file format to HTML. Note that the gemtext specification insists on line breaks being visually significant, and forbids their collapsing onto a single line; gmi2html respects this. However, inline whitespace is still collapsed outside of preformatted blocks. .SS Finger -.PP -Finger is supported through the \f[V]adapter/protocol/cha-finger\f[R] +Finger is supported through the \f[CR]adapter/protocol/cha\-finger\f[R] shell script. It is implemented as a shell script because of the protocol\[cq]s simplicity. -cha-finger uses the \f[V]curl\f[R] program\[cq]s telnet:// protocol to +cha\-finger uses the \f[CR]curl\f[R] program\[cq]s telnet:// protocol to make requests. -As such, it will not work if \f[V]curl\f[R] is not installed. +As such, it will not work if \f[CR]curl\f[R] is not installed. .PP -Aspiring protocol adapter writers are encouraged to study cha-finger for -a simple example of how a custom protocol handler could be written. +Aspiring protocol adapter writers are encouraged to study cha\-finger +for a simple example of how a custom protocol handler could be written. .SS Spartan -.PP Spartan is a protocol similar to Gemini, but without TLS. -It is supported through the \f[V]adapter/protocol/spartan\f[R] shell -script, which uses \f[V]nc\f[R] to make requests. +It is supported through the \f[CR]adapter/protocol/spartan\f[R] shell +script, which uses \f[CR]nc\f[R] to make requests. .PP Spartan has the very strange property of extending gemtext with a -protocol-specific line type. +protocol\-specific line type. This is sort of supported through a sed filter for gemtext outputs in the CGI script (in other words, no modification to gmi2html was done to support this). .SS Local schemes: file:, about:, man:, data: -.PP While these are not necessarily \f[I]protocols\f[R], they are implemented similarly to the protocols listed above (and thus can also be replaced, if the user wishes; see below). .PP -\f[V]file:\f[R] loads a file from the local filesystem. +\f[CR]file:\f[R] loads a file from the local filesystem. In case of directories, it shows the directory listing like the FTP protocol does. .PP -\f[V]about:\f[R] contains informational pages about the browser. +\f[CR]about:\f[R] contains informational pages about the browser. At the time of writing, the following pages are available: -\f[V]about:chawan\f[R], \f[V]about:blank\f[R] and -\f[V]about:license\f[R]. +\f[CR]about:chawan\f[R], \f[CR]about:blank\f[R] and +\f[CR]about:license\f[R]. .PP -\f[V]man:\f[R], \f[V]man-k:\f[R] and \f[V]man-l:\f[R] are wrappers -around the commands \f[V]man\f[R], \f[V]man -k\f[R] and -\f[V]man -l\f[R]. -These look up man pages using \f[V]/usr/bin/man\f[R] and turn on-page +\f[CR]man:\f[R], \f[CR]man\-k:\f[R] and \f[CR]man\-l:\f[R] are wrappers +around the commands \f[CR]man\f[R], \f[CR]man \-k\f[R] and +\f[CR]man \-l\f[R]. +These look up man pages using \f[CR]/usr/bin/man\f[R] and turn on\-page references into links. -A wrapper command \f[V]mancha\f[R] also exists; this has an interface -similar to \f[V]man\f[R]. +A wrapper command \f[CR]mancha\f[R] also exists; this has an interface +similar to \f[CR]man\f[R]. Note: this used to be based on w3mman2html.cgi, but it has been rewritten in Nim (and therefore no longer depends on Perl either). .PP -\f[V]data:\f[R] decodes a data URL as defined in RFC 2397. -.SS Internal schemes: cgi-bin:, stream:, cache: -.PP -Three internal protocols exist: \f[V]cgi-bin:\f[R], \f[V]stream:\f[R] -and \f[V]cache:\f[R]. +\f[CR]data:\f[R] decodes a data URL as defined in RFC 2397. +.SS Internal schemes: cgi\-bin:, stream:, cache: +Three internal protocols exist: \f[CR]cgi\-bin:\f[R], \f[CR]stream:\f[R] +and \f[CR]cache:\f[R]. These are the basic building blocks for the implementation of every protocol mentioned above; for this reason, these can \f[I]not\f[R] be replaced, and are implemented in the main browser binary. .PP -\f[V]cgi-bin:\f[R] executes a local CGI script. -This scheme is used for the actual implementation of the non-internal +\f[CR]cgi\-bin:\f[R] executes a local CGI script. +This scheme is used for the actual implementation of the non\-internal protocols mentioned above. Local CGI scripts can also be used to implement wrappers of other programs inside Chawan (e.g.\ dictionaries). .PP -\f[V]stream:\f[R] is used for reading in streams returned by external +\f[CR]stream:\f[R] is used for reading in streams returned by external programs or passed to Chawan via standard input. -It differs from \f[V]cgi-bin:\f[R] in that it does not cooperate with +It differs from \f[CR]cgi\-bin:\f[R] in that it does not cooperate with the external process, and that the loader does not keep track of where the stream originally comes from. Therefore it is suitable for reading in the output of mailcap entries, or for turning stdin into a URL. .PP -Since Chawan does not keep track of the origin of \f[V]stream:\f[R] +Since Chawan does not keep track of the origin of \f[CR]stream:\f[R] URLs, it is not possible to reload them. (For that matter, reloading stdin does not make much sense anyway.) To support rewinding and \[lq]view source\[rq], the output of -\f[V]stream:\f[R]\[cq]s is stored in a temporary file until the buffer +\f[CR]stream:\f[R]\[cq]s is stored in a temporary file until the buffer is discarded. .PP -\f[V]cache:\f[R] is not something an end user would normally see; -it\[cq]s used for rewinding or re-interpreting streams already +\f[CR]cache:\f[R] is not something an end user would normally see; +it\[cq]s used for rewinding or re\-interpreting streams already downloaded. Note that this is not a real cache; files are deterministically loaded from the \[lq]cache\[rq] upon certain actions, and from the network upon others, but neither is used as a fallback to the other. .SS Custom protocols -.PP -Chawan is protocol-agnostic. -This means that the \f[V]cha\f[R] binary itself does not know much about -the protocols listed above; instead, it loads these through a +Chawan is protocol\-agnostic. +This means that the \f[CR]cha\f[R] binary itself does not know much +about the protocols listed above; instead, it loads these through a combination of local CGI, urimethodmap, and if conversion to HTML or -plain text is necessary, mailcap (using x-htmloutput, x-ansioutput and +plain text is necessary, mailcap (using x\-htmloutput, x\-ansioutput and copiousoutput). .PP urimethodmap can also be used to override default handlers for the @@ -196,88 +173,78 @@ listing display, but much more powerful; this way, any library or program that can retrieve and output text through a certain protocol can be combined with Chawan. .PP -For example, consider the urimethodmap definition of cha-finger: +For example, consider the urimethodmap definition of cha\-finger: .IP -.nf -\f[C] -finger: cgi-bin:cha-finger -\f[R] -.fi +.EX +finger: cgi\-bin:cha\-finger +.EE .PP -This commands Chawan to load the cha-finger CGI script, setting the -\f[V]$MAPPED_URI_*\f[R] variables to the target URL\[cq]s parts in the +This commands Chawan to load the cha\-finger CGI script, setting the +\f[CR]$MAPPED_URI_*\f[R] variables to the target URL\[cq]s parts in the process. .PP -Then, cha-finger uses these passed parts to construct an appropriate -curl command that will retrieve the specified \f[V]finger:\f[R] URL; it -prints the header `Content-Type: text/plain' to the output, then an +Then, cha\-finger uses these passed parts to construct an appropriate +curl command that will retrieve the specified \f[CR]finger:\f[R] URL; it +prints the header `Content\-Type: text/plain' to the output, then an empty line, then the body of the retrieved resource. -If an error is encountered, it prints a \f[V]Cha-Control\f[R] header +If an error is encountered, it prints a \f[CR]Cha\-Control\f[R] header with an error code and a specific error message instead. .SS Adding a new protocol -.PP Here we will add a protocol called \[lq]cowsay\[rq], so that the URL -cowsay:text prints the output of \f[V]cowsay text\f[R] after a second of -waiting. +cowsay:text prints the output of \f[CR]cowsay text\f[R] after a second +of waiting. .PP -First, make sure you have a local CGI path \f[V]\[ti]/cgi-bin\f[R] set -up in your \f[V]\[ti]/.config/chawan/config.toml\f[R]: +First, make sure you have a local CGI path \f[CR]\[ti]/cgi\-bin\f[R] set +up in your \f[CR]\[ti]/.config/chawan/config.toml\f[R]: .IP -.nf -\f[C] -cgi-dir = [\[dq]\[ti]/cgi-bin\[dq], \[dq]${%CHA_LIBEXEC_DIR}/cgi-bin\[dq]] -\f[R] -.fi +.EX +cgi\-dir = [\[dq]\[ti]/cgi\-bin\[dq], \[dq]${%CHA_LIBEXEC_DIR}/cgi\-bin\[dq]] +.EE .PP It is also possible to just put your CGI scripts to -\f[V]/usr/local/libexec/chawan/cgi-bin\f[R]; this is enabled by default, -so you need no edits in your config. -But it seems more convenient to use a dedicated cgi-bin in your home +\f[CR]/usr/local/libexec/chawan/cgi\-bin\f[R]; this is enabled by +default, so you need no edits in your config. +But it seems more convenient to use a dedicated cgi\-bin in your home directory. .PP -\f[V]mkdir \[ti]/cgi-bin\f[R], and create a CGI script in -\f[V]\[ti]/cgi-bin\f[R] called \f[V]cowsay.cgi\f[R]: +\f[CR]mkdir \[ti]/cgi\-bin\f[R], and create a CGI script in +\f[CR]\[ti]/cgi\-bin\f[R] called \f[CR]cowsay.cgi\f[R]: .IP -.nf -\f[C] -#!/bin/sh -# We are going to wait a second from now, but want Chawan to show -# \[dq]Downloading...\[dq] instead of \[dq]Connecting...\[dq]. So signal to the browser that the -# connection has succeeded. -printf \[aq]Cha-Control: Connectedn\[aq] -sleep 1 # sleep -# Status is a special header that signals the equivalent HTTP status code. -printf \[aq]Status: 200\[aq] # HTTP OK -# Tell the browser that no more control headers are to be expected. -# This is useful when you want to send remotely received headers; then, it would -# be an attack vector to simply send the headers without ControlDone, as nothing -# stops the website from sending a Cha-Control header. With ControlDone sent, -# even Cha-Control headers will be interpreted as regular headers. -printf \[aq]Cha-Control: ControlDonen\[aq] -# As in HTTP, you must send an empty line before the body. +.EX +\f[I]#!/bin/sh\f[R] +\f[I]# We are going to wait a second from now, but want Chawan to show\f[R] +\f[I]# \[dq]Downloading...\[dq] instead of \[dq]Connecting...\[dq]. So signal to the browser that the\f[R] +\f[I]# connection has succeeded.\f[R] +printf \[aq]Cha\-Control: Connectedn\[aq] +sleep 1 \f[I]# sleep\f[R] +\f[I]# Status is a special header that signals the equivalent HTTP status code.\f[R] +printf \[aq]Status: 200\[aq] \f[I]# HTTP OK\f[R] +\f[I]# Tell the browser that no more control headers are to be expected.\f[R] +\f[I]# This is useful when you want to send remotely received headers; then, it would\f[R] +\f[I]# be an attack vector to simply send the headers without ControlDone, as nothing\f[R] +\f[I]# stops the website from sending a Cha\-Control header. With ControlDone sent,\f[R] +\f[I]# even Cha\-Control headers will be interpreted as regular headers.\f[R] +printf \[aq]Cha\-Control: ControlDonen\[aq] +\f[I]# As in HTTP, you must send an empty line before the body.\f[R] printf \[aq]n\[aq] -# Now, print the body. We take the path passed to the URL; urimethodmap -# sets this as MAPPED_URI_PATH. This is URI-encoded, so we also run the urldec -# utility on it. -cowsay \[dq]$(printf \[aq]%sn\[aq] \[dq]$MAPPED_URI_PATH\[dq] | \[dq]$CHA_LIBEXEC_DIR\[dq]/urldec)\[dq] -\f[R] -.fi +\f[I]# Now, print the body. We take the path passed to the URL; urimethodmap\f[R] +\f[I]# sets this as MAPPED_URI_PATH. This is URI\-encoded, so we also run the urldec\f[R] +\f[I]# utility on it.\f[R] +cowsay \[dq]$(printf \[aq]%sn\[aq] \[dq]$MAPPED_URI_PATH\[dq] \f[B]|\f[R] \[dq]$CHA_LIBEXEC_DIR\[dq]/urldec)\[dq] +.EE .PP -Now, create a \[lq].urimethodmap\[rq] file in your \f[V]$HOME\f[R] +Now, create a \[lq].urimethodmap\[rq] file in your \f[CR]$HOME\f[R] directory. .PP Then, enter into it the following: .IP -.nf -\f[C] -cowsay: /cgi-bin/cowsay.cgi -\f[R] -.fi +.EX +cowsay: /cgi\-bin/cowsay.cgi +.EE .PP -Now try \f[V]cha cowsay:Hello,%20world.\f[R]. +Now try \f[CR]cha cowsay:Hello,%20world.\f[R]. If you did everything correctly, it should wait one second, then print a cow saying \[lq]Hello, world.\[rq]. .SS See also -.PP -\f[B]cha\f[R](1), \f[B]cha-localcgi\f[R](5), -\f[B]cha-urimethodmap\f[R](5), \f[B]cha-mailcap\f[R](5) +\f[B]cha\f[R](1), \f[B]cha\-localcgi\f[R](5), +\f[B]cha\-urimethodmap\f[R](5), \f[B]cha\-mailcap\f[R](5) diff --git a/doc/config.md b/doc/config.md index a0140c9f..2177eba2 100644 --- a/doc/config.md +++ b/doc/config.md @@ -189,6 +189,13 @@ Following is a list of external options: </tr> <tr> +<td>sockdir</td> +<td>path</td> +<td>Directory used to store UNIX domain sockets used for inter-process +communication.</td> +</tr> + +<tr> <td>editor</td> <td>shell command</td> <td>External editor command. %s is substituted for the file name, %d for @@ -752,22 +759,15 @@ unspecified. </tr> <tr> -<td>`cmd.pager.cursorUp`</td> -<td>Move the cursor upwards by n lines, or if n is unspecified, by 1.</td> -</tr> -<tr> -<td>`cmd.pager.cursorDown`</td> -<td>Move the cursor downwards by n lines, or if n is unspecified, by 1.</td> +<td>`cmd.pager.cursorUp`, `cmd.pager.cursorDown`</td> +<td>Move the cursor upwards/downwards by n lines, or if n is unspecified, by +1.</td> </tr> <tr> -<td>`cmd.pager.cursorLeft`</td> -<td>Move the cursor to the left by n cells, or if n is unspecified, by 1.</td> -</tr> - -<tr> -<td>`cmd.pager.cursorRight`</td> -<td>Move the cursor to the right by n cells, or if n is unspecified, by 1.</td> +<td>`cmd.pager.cursorLeft`, `cmd.pager.cursorRight`</td> +<td>Move the cursor to the left/right by n cells, or if n is unspecified, by +1.</td> </tr> <tr> @@ -812,23 +812,15 @@ already there, to the end of the previous word.</td> </tr> <tr> -<td>`cmd.pager.cursorPrevLink`</td> -<td>Move the cursor to the beginning of the previous clickable element.</td> -</tr> - -<tr> -<td>`cmd.pager.cursorNextLink`</td> -<td>Move the cursor to the beginning of the next clickable element.</td> -</tr> - -<tr> -<td>`cmd.pager.cursorPrevParagraph`</td> -<td>Move the cursor to the beginning of the nth next paragraph.</td> +<td>`cmd.pager.cursorPrevLink`, `cmd.pager.cursorNextLink`</td> +<td>Move the cursor to the end/beginning of the previous/next clickable +element (e.g. link, input field, etc).</td> </tr> <tr> -<td>`cmd.pager.cursorNextParagraph`</td> -<td>Move the cursor to the end of the nth previous paragraph.</td> +<td>`cmd.pager.cursorPrevParagraph`, `cmd.pager.cursorNextParagraph`</td> +<td>Move the cursor to the end/beginning of the nth previous/next +paragraph.</td> </tr> <tr> @@ -1180,8 +1172,8 @@ searches for the string `abcd` inside all lines. * The string `\c` (backslash + lower-case c) inside a search-mode regex enables case-insensitive matching. -* Conversely, `\C` (backslash + capital C) disables case-insensitive - matching. (Useful if you have the "i" flag inside default-flags.) +* Conversely, `\C` (backslash + capital C) disables case-insensitive matching. + (Useful if you have `ignore-case` set to true, which is the default.) * `\<` and `\>` is converted to `\b` (as in vi, grep, etc.) Note that none of these work in "match" mode. @@ -1195,8 +1187,8 @@ Rules for path handling are similar to how strings in the shell are handled. * Environment variables can be used like `$ENV_VAR`. * Relative paths are relative to the Chawan configuration directory. -Some non-external variables are also defined by Chawan. These can be accessed -using the syntax `${%VARIABLE}`: +Some internal variables are also defined by Chawan. These can be accessed using +the non-standard syntax `${%VARIABLE}`: * `${%CHA_BIN_DIR}`: the directory which the `cha` binary resides in. Note that symbolic links are automatically resolved to determine this path. diff --git a/res/config.toml b/res/config.toml index f126467c..7780db51 100644 --- a/res/config.toml +++ b/res/config.toml @@ -291,8 +291,6 @@ substitute-url = 'x => "https://lite.duckduckgo.com/lite/?kp=-1&kd=-1&q=" + enco [page] # buffer commands -q = 'cmd.pager.quit' -C-z = 'cmd.pager.suspend' h = 'cmd.buffer.cursorLeft' j = 'cmd.buffer.cursorDown' k = 'cmd.buffer.cursorUp' @@ -369,6 +367,8 @@ V = 'cmd.buffer.cursorToggleSelectionLine' C-v = 'cmd.buffer.cursorToggleSelectionBlock' # pager commands +q = 'cmd.pager.quit' +C-z = 'cmd.pager.suspend' sS = 'cmd.pager.saveSource' M-u = 'cmd.pager.dupeBuffer' C-l = 'cmd.pager.load' |