Skip to content

cub view edit

cub view edit

Edit a view in your system's editor

Synopsis

Open a view in the editor named by the EDITOR environment variable, or vi if it is not set, as a document: the fields an update can set, with the entities the view refers to named rather than identified by ID. When the editor exits, the view is updated with what changed: fields left alone keep what the view holds, and fields removed are cleared. If nothing changed, no update is made. If the view changed since it was read, the update is refused; edit it again.

A view with a backing Unit is edited through the Unit: the edit is saved as a Revision of the Unit, the Unit's triggers run, and the view is then updated from the Unit, unless they report validation errors. The edit is refused when the Unit has changes the view has not taken, unless --force is given, which applies them along with the edit.

An edit that cannot be saved is left in a file, whose name is reported.

cub view edit <view> [flags]

Options

      --force           edit the view's backing Unit even though it has changes the view has not taken, and apply them with the edit
  -h, --help            help for edit
  -o, --output string   Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
      --quiet           No default output.
      --verbose         Detailed output, additive with default output

Options inherited from parent commands

      --component string   the Component of --variant, when that names the variant alone; --variant <component>/<variant> says the same in one flag
      --context string     The context to use for this command
      --debug              Debug output
      --space string       space to operate in, by slug or UUID. Omitted, a list or bulk operation spans the organization and a single entity is named as <space>/<slug>; "*" means the same as omitting it
      --variant string     variant to operate in, as <component>/<variant>, or as <variant> with --component: the space naming that Component whose Variant label is <variant>. The same scope as --space, named by what it is rather than by the space's slug; the two cannot be combined

SEE ALSO