Liking cljdoc? Tell your friends :D

rainboots.command

Command definitions

Command definitions
raw docstring

*commands*clj

source

build-upclj

(build-up string)
source

cmd-metaclj

(cmd-meta fun extra-meta)

Extract meta information for a command function, given its var

Extract meta information for a command
function, given its var
sourceraw docstring

default-on-cmdclj

(default-on-cmd on-err on-404 can-exec? cli input)

The default on-cmd handler; if there is anything on the input stack, it will delegate to that. Othewise, it will call (exec-command) with the default cmdset

The default on-cmd handler; if there is anything on the input stack,
it will delegate to that. Othewise, it will call (exec-command) with
the default cmdset
sourceraw docstring

defcmdcljmacro

(defcmd cmd-name & decl)

Declare a command that can be invoked from the default on-cmd handler. The syntax is similar to (defn), including support for multi-arity. Note, however, that same-arity with different argtypes is NOT supported.

The cmd-name may be annotated with ^:no-abbrev if the command may only be executed by inputting the full name; otherwise, abbreviations will be generated starting from the first letter, then the first two letters, and so on.

Alternatively, you may annotate with eg ^{:abbrev ["w" "west"]} to explicitly declare what invocations may be used. Here, you must include the full name; rainboots will not generate any abbreviations.

Declare a command that can be invoked from the default on-cmd
handler. The syntax is similar to (defn), including support for
multi-arity. Note, however, that same-arity with different argtypes
is NOT supported.

The cmd-name may be annotated with ^:no-abbrev if the command may
only be executed by inputting the full name; otherwise,
abbreviations will be generated starting from the first letter, then
the first two letters, and so on.

Alternatively, you may annotate with eg `^{:abbrev ["w"
"west"]}` to explicitly declare what invocations may be used.
Here, you *must* include the full name; rainboots will not generate
*any* abbreviations.
sourceraw docstring

defcmdsetcljmacro

(defcmdset set-name & cmd-defs)

Declare a command set. Command sets can be pushed and popped. Command sets have a def'd name by which you can refer to them when pushing and popping.

A typical declaration will look like:

(defcmdset basic
  (defcmd look
    [cli]
    (send! cli "You see some stuff")))
Declare a command set. Command sets can be pushed and popped.
 Command sets have a def'd name by which you can refer to them when
 pushing and popping.

A typical declaration will look like:

```
(defcmdset basic
  (defcmd look
    [cli]
    (send! cli "You see some stuff")))
```
sourceraw docstring

exec-commandclj

(exec-command on-404 can-exec? cli input)

Attempts to execute a command from the default commands set; returns true on success; calls on-404 and returns false on failure

Attempts to execute a command from the default commands set; returns
true on success; calls on-404 and returns false on failure
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close