diff --git a/.vim/autoload/vimrc/git.vim b/.vim/autoload/vimrc/git.vim index b2598e9..99c6494 100644 --- a/.vim/autoload/vimrc/git.vim +++ b/.vim/autoload/vimrc/git.vim @@ -32,9 +32,9 @@ export def ConventionalCommits(a: any, l: string, p: number): list return ['✨feat:', '🐞fix:', '📝docs:', '🔨refactor:', '🎨style:', '⏪revert:', '✅test:', '🔧chore:', '🎉release:'] enddef export def Commit(a: string) -ec system($'git commit -m "{a}"') +ec system($'git commit -m {shellescape(a)}') enddef export def TagPush(a: string) ec system($'git tag "{a}"') -ec system($'git push origin "{a}"') +ec system($'git push origin "{shellescape(a)}"') enddef diff --git a/src/.vim/autoload/vimrc/git.src.vim b/src/.vim/autoload/vimrc/git.src.vim index b0ee530..7f1ced4 100644 --- a/src/.vim/autoload/vimrc/git.src.vim +++ b/src/.vim/autoload/vimrc/git.src.vim @@ -34,13 +34,13 @@ export def ConventionalCommits(a: any, l: string, p: number): list return ['✨feat:', '🐞fix:', '📝docs:', '🔨refactor:', '🎨style:', '⏪revert:', '✅test:', '🔧chore:', '🎉release:'] enddef -export def Commit(args: string) - echo system($'git commit -m "{args}"') +export def Commit(msg: string) + echo system($'git commit -m {shellescape(msg)}') enddef export def TagPush(tagname: string) echo system($'git tag "{tagname}"') - echo system($'git push origin "{tagname}"') + echo system($'git push origin "{shellescape(tagname)}"') enddef # 以下はvimrcで定義する