How do I customize the 'commit message file' generated by `hg commit`?

后端 未结 6 553
星月不相逢
星月不相逢 2021-01-17 22:14

When I run hg commit, Mercurial generates a file for my commit message that looks like this :

HG: Enter commit message.  Lines beginning with \'         


        
6条回答
  •  礼貌的吻别
    2021-01-17 22:40

    There are many ways to do this. Some are even listed on the official wiki. This expands on @Ry4an answer. You can add this to your ~/.hgrc

    [ui]
    editor = function hgvi { hg status --unknown | sed 's/^/HG: /g' >> "$1"; vi "$1"; }; hgvi
    

提交回复
热议问题