Skip to content

Commit

Permalink
✨feat: コミットメッセージをちゃんとエスケープ
Browse files Browse the repository at this point in the history
  • Loading branch information
utubo committed Nov 28, 2024
1 parent e9599b1 commit 4337eab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .vim/autoload/vimrc/git.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export def ConventionalCommits(a: any, l: string, p: number): list<string>
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
6 changes: 3 additions & 3 deletions src/.vim/autoload/vimrc/git.src.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export def ConventionalCommits(a: any, l: string, p: number): list<string>
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で定義する
Expand Down

0 comments on commit 4337eab

Please sign in to comment.