diff --git a/README.asciidoc b/README.asciidoc index 687819f6..e7dab450 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -466,7 +466,9 @@ Commands When pressing `:` in normal mode, Kakoune will open a prompt to enter a command. Commands are used for non editing tasks, such as opening a buffer, writing the -current one, quitting, etc. +current one, quitting, etc. You can cycle through the command history with +`` and ``. Commands starting with horizontal whitespace (e.g. a +space) will not be saved in the command history. Basic Commands ~~~~~~~~~~~~~~ diff --git a/rc/man.kak b/rc/man.kak index 95b9986a..957772a5 100644 --- a/rc/man.kak +++ b/rc/man.kak @@ -33,7 +33,14 @@ def -hidden -shell-params _man %{ %sh{ fi } } -def -shell-params man %{ %sh{ +def -shell-params \ + -shell-completion %{ + prefix=${1:0:${kak_pos_in_token}} + for page in /usr/share/man/*/${prefix}*.1.gz; do + basename $page .1.gz + done + } \ + man %{ %sh{ [ -z "$@" ] && set -- "$kak_selection" echo "eval -try-client %opt{docsclient} _man $@" } } diff --git a/rc/sh.kak b/rc/sh.kak index 26f98202..4d07c4b2 100644 --- a/rc/sh.kak +++ b/rc/sh.kak @@ -7,8 +7,8 @@ hook global BufSetOption mimetype=text/x-shellscript %{ } addhl -group / regions -default code sh \ - double_string %{"} %{(?