GreenAsh.Command (GreenAsh v0.3.0)

Copy Markdown View Source

Parser + application of the : command line (Vim-style), shared by all screens. Paths are built from the mount base (base) provided by the host, and resources are resolved among domains.

Internal directives: {:navigate, path}, {:redirect, path}, {:message, text}, {:columns, names}, :toggle_debug, :whoami, :noop, :not_command.

Summary

Functions

Interprets and applies an input on the socket ({:noreply, socket}).

Interprets an input (mount base + domains to resolve).

Functions

apply_to(socket, input, opts \\ [])

Interprets and applies an input on the socket ({:noreply, socket}).

Reads socket.assigns.base and socket.assigns.domains. Options:

  • :on_debugfn socket -> {:noreply, socket} end;
  • :on_columnsfn names, socket -> {:noreply, socket} end;
  • :on_otherfn input, socket -> {:noreply, socket} end (input without :).

help()

parse(input, base, domains)

Interprets an input (mount base + domains to resolve).