重复上一个sbt命令?

0__*_*0__ 2 scala intellij-idea sbt

是否有一个简短的sbt命令或键盘快捷键来重新调用最后发出的命令?我发现自己必须反复执行这个问题:

> test-only my.long.package.etc.class.name
Run Code Online (Sandbox Code Playgroud)

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

Pau*_*her 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
Run Code Online (Sandbox Code Playgroud)

然后获得帮助!:

> !
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'
Run Code Online (Sandbox Code Playgroud)

  • 要立即解决,您可能还会看到"帮助别名". (2认同)