diff --git a/rc/tools/doc.asciidoc b/rc/tools/doc.asciidoc index ff1fbae9..14ea2920 100644 --- a/rc/tools/doc.asciidoc +++ b/rc/tools/doc.asciidoc @@ -10,6 +10,6 @@ == Options *docsclient* (str):: - If set, the `:doc` command (and other commands that display documentation) - will try to display documentation in the Kakoune client with this name. + If set, the `:doc` command will try to display documentation in the Kakoune + client with this name. See <> diff --git a/rc/tools/doc.kak b/rc/tools/doc.kak index b68f9363..d88dcda2 100644 --- a/rc/tools/doc.kak +++ b/rc/tools/doc.kak @@ -137,18 +137,20 @@ define-command -params 1 -hidden doc-render %{ define-command -params 1..2 \ -shell-script-candidates %{ if [ "$kak_token_to_complete" -eq 0 ]; then - ( - find "${kak_runtime}/doc/" -type f -name "*.asciidoc" - find "${kak_runtime}/rc/" -type f -name "*.asciidoc" - find "${kak_config}/autoload/" -type f -name "*.asciidoc" - ) | sed 's,.*/,,; s/\.[^/]*$//' + find -L \ + "${kak_config}/autoload/" \ + "${kak_runtime}/doc/" \ + "${kak_runtime}/rc/" \ + -type f -name "*.asciidoc" | + sed 's,.*/,,; s/\.[^.]*$//' elif [ "$kak_token_to_complete" -eq 1 ]; then page=$( - ( - find "${kak_runtime}/doc/" -type f -name "$1.asciidoc" - find "${kak_runtime}/rc/" -type f -name "$1.asciidoc" - find "${kak_config}/autoload/" -type f -name "$1.asciidoc" - ) | head -1 + find -L \ + "${kak_config}/autoload/" \ + "${kak_runtime}/doc/" \ + "${kak_runtime}/rc/" \ + -type f -name "$1.asciidoc" | + head -1 ) if [ -f "${page}" ]; then awk ' @@ -164,11 +166,12 @@ define-command -params 1..2 \ } %{ evaluate-commands %sh{ page=$( - ( - find "${kak_runtime}/doc/" -type f -name "$1.asciidoc" - find "${kak_runtime}/rc/" -type f -name "$1.asciidoc" - find "${kak_config}/autoload/" -type f -name "$1.asciidoc" - ) | head -1 + find -L \ + "${kak_config}/autoload/" \ + "${kak_runtime}/doc/" \ + "${kak_runtime}/rc/" \ + -type f -name "$1.asciidoc" | + head -1 ) if [ -f "${page}" ]; then jump_cmd="" diff --git a/rc/tools/lint.asciidoc b/rc/tools/lint.asciidoc index 3590eb7e..da7213bf 100644 --- a/rc/tools/lint.asciidoc +++ b/rc/tools/lint.asciidoc @@ -1,8 +1,8 @@ = Integrate with tools that check files for problems. Many file-formats have "lint" tools that check for common problems and point out -where they occur. Most of these tools produce output in the the traditional -message format: +where they occur. Most of these tools produce output in the traditional message +format: ---- {filename}:{line}:{column}: {kind}: {message} @@ -15,7 +15,7 @@ This plugin can run such tools and collect the resulting messages. The complete output is collected in the `*lint-output*` buffer, and any lines in the current file with messages will have a marker displayed next to them in the left margin. When the cursor moves onto a line with the problem, the associated messages will -be displayed in a tool tip.. +be displayed in a tool tip. == Commands @@ -46,12 +46,11 @@ be displayed in a tool tip.. The shell command used by lint-buffer and lint-selections. + It will be given the path to a file containing the text to be - linted, and must produce output in the format: + linted, and must produce output in the format described above. *toolsclient* (str):: - If set, the `:lint` command (and other commands that point out files and - line-numbers) will try to display its results in the Kakoune client with - this name. + If set, the `:lint` command will try to display its results in the Kakoune + client with this name. See <>