1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-15 18:15:53 +03:00

git-tools.kak: Add completion support to git command

This commit is contained in:
Maxime Coste 2014-08-14 19:42:24 +01:00
parent fbbe741c07
commit 2d42783dbd

View File

@ -24,6 +24,15 @@ decl line-flag-list git_diff_flags
def -shell-params \
-docstring "git wrapping helper" \
-shell-completion %{
shift $(expr ${kak_token_to_complete})
prefix=${1:0:${kak_pos_in_token}}
(
for cmd in show log diff status blame hide-blame show-diff update-diff checkout add; do
expr "${cmd}" : "^\(${prefix}.*\)$"
done
) | grep -v '^$'
} \
git %{ %sh{
show_git_cmd_output() {
local filetype