mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 15:19:12 +08:00
feat(git): add :Git clean
command
This commit is contained in:
parent
3d63320771
commit
99e0262f12
6
bundle/git.vim/autoload/git.vim
vendored
6
bundle/git.vim/autoload/git.vim
vendored
@ -31,6 +31,8 @@ function! git#run(...) abort
|
||||
call git#diff#run(a:000[1:])
|
||||
elseif cmd ==# 'rm'
|
||||
call git#rm#run(a:000[1:])
|
||||
elseif cmd ==# 'clean'
|
||||
call git#clean#run(a:000[1:])
|
||||
elseif cmd ==# 'mv'
|
||||
call git#mv#run(a:000[1:])
|
||||
elseif cmd ==# 'log'
|
||||
@ -78,7 +80,7 @@ function! git#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
return join(['add', 'push', 'status', 'commit', 'diff',
|
||||
\ 'merge', 'rebase', 'branch', 'checkout',
|
||||
\ 'fetch', 'reset', 'log', 'config', 'reflog',
|
||||
\ 'blame', 'pull', 'stash', 'cherry-pick', 'rm', 'mv', 'remote'
|
||||
\ 'blame', 'pull', 'stash', 'cherry-pick', 'rm', 'mv', 'remote', 'clean'
|
||||
\ ],
|
||||
\ "\n")
|
||||
elseif str =~# '^Git\s\+add\s\+.*$'
|
||||
@ -111,6 +113,8 @@ function! git#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
return git#config#complete(a:ArgLead, a:CmdLine, a:CursorPos)
|
||||
elseif str =~# '^Git\s\+reflog\s\+.*$'
|
||||
return git#reflog#complete(a:ArgLead, a:CmdLine, a:CursorPos)
|
||||
elseif str =~# '^Git\s\+clean\s\+.*$'
|
||||
return git#clean#complete(a:ArgLead, a:CmdLine, a:CursorPos)
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
|
15
bundle/git.vim/doc/git.txt
vendored
15
bundle/git.vim/doc/git.txt
vendored
@ -7,9 +7,10 @@ CONTENTS *git-contents*
|
||||
2. Commands...................................................|git-commands|
|
||||
1. git-add.....................................................|git-add|
|
||||
2. git-cherry-pick.....................................|git-cherry-pick|
|
||||
3. git-mv.......................................................|git-mv|
|
||||
4. git-rm.......................................................|git-rm|
|
||||
5. git-stash.................................................|git-stash|
|
||||
3. git-clean.................................................|git-clean|
|
||||
4. git-mv.......................................................|git-mv|
|
||||
5. git-rm.......................................................|git-rm|
|
||||
6. git-stash.................................................|git-stash|
|
||||
|
||||
==============================================================================
|
||||
INTRODUCTION *git-intro*
|
||||
@ -40,6 +41,14 @@ This command is to cherry pick commit from other branch.
|
||||
:Git cherry-pick <HashA> <HashB>
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
GIT-CLEAN *git-clean*
|
||||
|
||||
This commands is to run `git clean`.
|
||||
>
|
||||
:Git clean -f
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
GIT-MV *git-mv*
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user