2

是否有一个简短的 sbt 命令或键盘快捷键来重新调用最后发出的命令?我发现自己不得不重复执行此操作:

> test-only my.long.package.etc.class.name

复制+粘贴有点烦人。我正在使用 IntelliJ IDEA 中的 sbt 控制台,因此向上滚动浏览历史记录不起作用。

4

2 回答 2

12

你想要!!。要查看 的帮助sbt,请help在提示符处键入:

> help

  help                         Displays this help message or prints detailed help on requested commands (run 'help <command>').
  about                        Displays basic information about sbt and the build.
  reload                       (Re)loads the project in the current directory
  settings                     Lists the settings defined for the current project.
  tasks                        Lists the tasks defined for the current project.
  projects                     Lists the names of available projects or temporarily adds/removes extra builds to the session.
  project                      Displays the current project or changes to the provided `project`.
  set                          Evaluates a Setting and applies it to the current project.
  session                      Manipulates session settings.  For details, run 'help session'.
  inspect                      Prints the value for 'key', the defining scope, delegates, related definitions, and dependencies.
  ; <command> (; <command>)*   Runs the provided semicolon-separated commands.
  ~ <command>                  Executes the specified command whenever source files change.
  last                         Displays output from a previous command or the output from a specific task.
  last-grep                    Shows lines from the last output for 'key' that match 'pattern'.
  exit                         Terminates the build.
  show <key>                   Displays the result of evaluating the setting or task associated with 'key'.

More command help available using 'help <command>' for:
  !, -, <, alias, append, apply, eval, iflast, reboot, shell

然后获得帮助!

> !
History commands:
   !!    Execute the last command again
   !:    Show all previous commands
   !:n    Show the last n commands
   !n    Execute the command with index n, as shown by the !: command
   !-n    Execute the nth command before this one
   !string    Execute the most recent command starting with 'string'
   !?string    Execute the most recent command containing 'string'
于 2012-10-05T18:02:27.497 回答
2

升级到 IDEA 的 sbt 插件的最新版本 1.4.0,因为它支持箭头键历史记录。

于 2012-10-05T21:22:27.977 回答