Skip to content

Commit ef6069c

Browse files
committed
look_command (config :moss, default true): a node may leave the look command out of the browser and its help, as the build eval's comparison does to measure the look in open app alone (Arock feature look)
1 parent 31faace commit ef6069c

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

‎lib/moss/computer/browser.ex‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,21 @@ defmodule Moss.Computer.Browser do
2323
A password field is the person's: the browser never types into one.
2424
`open app` opens the computer's own pages (`ui/*.lui` and its apps', at http://app/), as its person sees it:
2525
laid out with its stylesheet, what it hides not read. `open app --width 390 --dark` is a phone in the dark
26-
theme (1280, light, until changed). `look [--width N] [--dark]` names, by line, what its person could not use
27-
on the app's page: a control of no size or under another element, what runs off the screen, faint text.
26+
theme (1280, light, until changed).
2827
"""
2928

30-
@names ~w(open page read ui click type submit back tabs close data cookies look)
31-
def names, do: @names
32-
def help, do: @help
29+
@look """
30+
`look [--width N] [--dark]` names, by line, what its person could not use on the app's page: a control of no
31+
size or under another element, what runs off the screen, faint text.
32+
"""
33+
34+
@names ~w(open page read ui click type submit back tabs close data cookies)
35+
36+
# `look` is there unless the node turns it off (config :moss, look_command: false), as the build eval's
37+
# comparison does to measure the look in `open app` alone
38+
defp look?, do: Application.get_env(:moss, :look_command, true)
39+
def names, do: if(look?(), do: @names ++ ["look"], else: @names)
40+
def help, do: if(look?(), do: @help <> @look, else: @help)
3341

3442
def new, do: Tabs.new()
3543
def front(state), do: Tabs.front(state)

0 commit comments

Comments
 (0)