From 1764ce0bdc2b2ec3a563b01480ff7b07906b0b7d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 19 Feb 2014 03:45:41 +0000 Subject: [PATCH] Add docstrings to some commands --- rc/client.kak | 3 ++- rc/cpp.kak | 2 +- rc/ctags.kak | 3 ++- rc/make.kak | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rc/client.kak b/rc/client.kak index 4362e65b..a1a58a35 100644 --- a/rc/client.kak +++ b/rc/client.kak @@ -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 & }} diff --git a/rc/cpp.kak b/rc/cpp.kak index d5825cc9..1edb9b6c 100644 --- a/rc/cpp.kak +++ b/rc/cpp.kak @@ -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}) diff --git a/rc/ctags.kak b/rc/ctags.kak index 757346c3..bfc0c2fc 100644 --- a/rc/ctags.kak +++ b/rc/ctags.kak @@ -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 diff --git a/rc/make.kak b/rc/make.kak index 7ea15934..09f5591b 100644 --- a/rc/make.kak +++ b/rc/make.kak @@ -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 "Entering directory" exec s "Entering directory '([^']+)'.*\n([^:]+):(\d+):(\d+):[^\n]+\'" l