Sco*_*ott 6 linux bash command-line-interface svn
我在 Ubuntu 10.04 上使用 Subversion 1.6.6,运行 bash shell。我想在我的提交消息中插入回车、换行或换行符,以便在阅读日志时,注释的格式正确。当我使用系统编辑器或为提交注释指定一个文件时,它工作正常,但我真正想要的是能够执行以下操作:
svn ci -m "This is the first line\nThis is the second line"
Run Code Online (Sandbox Code Playgroud)
并将评论显示为:
This is the first line
This is the second line
Run Code Online (Sandbox Code Playgroud)
我的例子不起作用,它产生输出:
这是第一行\n这是第二行
那么,有没有办法做到这一点?如果是这样,如何?
尝试这个:
svn ci -m $'This is the first line\nThis is the second line'
Run Code Online (Sandbox Code Playgroud)