From 7ebbd8ea455bb59c7c2ef58ce706cb0c60148d22 Mon Sep 17 00:00:00 2001 From: havocp Date: Sun, 30 Sep 2012 14:06:21 -0700 Subject: [PATCH] Try to explain briefly what a command is at the top --- Extending/Commands.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Extending/Commands.md b/Extending/Commands.md index 083b5ac..752a956 100644 --- a/Extending/Commands.md +++ b/Extending/Commands.md @@ -3,6 +3,12 @@ # Commands +# What is a "command"? + +A "command" looks similar to a task: it's a named operation that can be executed from the sbt console. + +However, a command's implementation takes as its parameter the entire state of the build (represented by [State]) and computes a new [State]. This means that a command can look at or modify other sbt settings, for example. Typically, you would resort to a command when you need to do something that's impossible in a regular task. + # Introduction There are three main aspects to commands: