"版本结束时%:=" 0.1-SNAPSHOT"%"意思?

时间:2014-09-19 12:37:52

标签: scala sbt

我在build.sbt文件中看到:

organization := "wfdf23"

name := "default"

version := "0.1-SNAPSHOT"%

%行末尾有一个version。这是什么意思?


更新:由sbt np plugin生成,有效加载sbt

➜  np-test  sbt np
[info] Loading global plugins from /Users/freewind/.sbt/0.13/plugins
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Set current project to np-test (in build file:/private/tmp/Wfdf23/np-test/)
[info] Generated build file
[info] Generated source directories
[success] Total time: 0 s, completed 2014-9-19 22:05:01

➜  np-test  cat build.sbt
organization := "np-test"

name := "default"

version := "0.1-SNAPSHOT"%                                                                                            

➜  np-test  sbt about
[info] Loading global plugins from /Users/freewind/.sbt/0.13/plugins
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Set current project to default (in build file:/private/tmp/Wfdf23/np-test/)
[info] This is sbt 0.13.5
[info] The current project is {file:/private/tmp/Wfdf23/np-test/}np-test 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.4
[info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin, np.Plugin, org.sbtidea.SbtIdeaPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.4

➜  np-test  cat ~/.sbt/0.13/plugins/np.sbt
resolvers += Resolver.url("sbt-plugin-releases",
  url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(
    Resolver.ivyStylePatterns)

addSbtPlugin("me.lessis" % "np" % "0.2.0")

1 个答案:

答案 0 :(得分:2)

在最后一行末尾的

tl; dr %是zsh通知你所谓的部分行的方法,即没有行的行\n位于行尾,例如cat文件时。

看来你在zsh或oh-my-zsh shell下工作(提示看起来很熟悉)所以你问题中的%是zsh / oh-my-zsh shell的东西,它们并没有真正出现在里面的文件中,即当您打开文件时,您会看到相关文件的末尾没有换行符。

P.S。在有一天想知道解决方案之后,当我在终端中发现它时,我的脸看起来很惊讶。

相关问题