Quartz sync시 이상한 현상에서 겪었던 한글 자소분리 현상.
macOS의 조합형 한글과 나머지 파일시스템들의 완성형 차이 문제.
몇 가지 방안을 고민하다가 git hook으로 커밋/머지 시점에 convmv 작동시켜보기로 했다.
.git/hooks경로에 아래 내용으로 pre-commit, post-merge파일을 만들고
#!/bin/bash
echo "normalizing hangul from decomposition to composition..."
convmv -r -f utf8 -t utf8 --nfc --notest .실행 플래그를 켠다.
chmod +x .git/hooks/pre-commit .git/hooks/post-merge이제 npx quartz sync 할 때 git hook에 의해 한글 정규화가 실행된다.
❯ npx quartz sync
Quartz v4.3.1
Backing up your content
normalizing hangul from decomposition to composition...
Ready! I converted 0 files in 2 seconds.