Add docstrings to some commands

This commit is contained in:
Maxime Coste 2014-02-19 03:45:41 +00:00
parent aab390ab92
commit 1764ce0bdc
4 changed files with 6 additions and 4 deletions

View File

@ -6,7 +6,8 @@ decl str termcmd %sh{
fi
}
def new -shell-params %{ nop %sh{
def new -docstring 'create a new kak client for current session' \
-shell-params %{ nop %sh{
if (( $# != 0 )); then kakoune_params="-e '$@'"; fi
setsid ${kak_opt_termcmd} "kak -c ${kak_session} ${kakoune_params}" < /dev/null >& /dev/null &
}}

View File

@ -74,7 +74,7 @@ hook global BufNew .*\.(h|hh|hpp|hxx|H) _cpp_insert_include_guards
decl str-list alt_dirs ".;.."
def alt %{ %sh{
def alt -docstring "Jump to the alternate file (header/implementation)" %{ %sh{
shopt -s extglob
alt_dirs=${kak_opt_alt_dirs//;/ }
file=$(basename ${kak_buffile})

View File

@ -5,6 +5,7 @@
def -shell-params \
-shell-completion 'readtags -p "$1" | cut -f 1 | sort | uniq' \
-docstring 'jump to tag definition' \
tag \
%{ %sh{
if [[ -z "$1" ]]; then tagname=${kak_selection}; else tagname=$1; fi
@ -59,7 +60,7 @@ def ctags-disable-autoinfo %{ rmhooks window ctags-autoinfo }
decl str ctagsopts "-R ."
def gentags %{
def gentags -docstring 'generate tag file asynchronously' %{
echo -color Information "launching tag generation in the background"
%sh{ (
if ctags -f .tags.kaktmp ${kak_opt_ctagsopts}; then

View File

@ -23,7 +23,7 @@ hook global WinSetOption filetype=make %{
hook global WinSetOption filetype=(?!make).* %{ rmhl make; rmhooks buffer make-hooks }
def errjump %{
def errjump -docstring 'Jump to error location' %{
try %{
exec gll<a-?> "Entering directory" <ret>
exec s "Entering directory '([^']+)'.*\n([^:]+):(\d+):(\d+):[^\n]+\'" <ret>l