project

gest project subcommand tree for showing, archiving, attaching, and listing projects.
Name Summary
archive gest project archive: soft-archive a project, detaching all workspaces and hiding owned entities from list views.
attach gest project attach: attach the current directory to an existing project as a workspace.
delete gest project delete: delete a project and all of its owned entities.
detach gest project detach: detach the current directory from its project.
list gest project list: list all known projects.
unarchive gest project unarchive: restore an archived project to active status.

struct Command

source

pub struct Command

Show or manage the current project.

Field Type Description
json bool Emit output as JSON (only applies to the default show view).
subcommand Option<Sub> The subcommand to run; with none, the command shows the current project.

Implements FromArgMatches, Args, Debug.

Command::call

source

pub async fn call(&self, context: &AppContext) -> Result<(), Error>

Dispatch to the matched project subcommand, or show the current project.

Parameter Type Description
context &AppContext the application context: settings, store and current project
returns Result<(), Error> The result of the subcommand, or of Self::show when there is none.

Command::show

source

async fn show(&self, context: &AppContext) -> Result<(), Error>

Show the current project’s ID and root, as a view or as JSON with --json.

Parameter Type Description
context &AppContext the application context: settings, store and current project
returns Result<(), Error> Ok(()) once the project is printed, Error::UninitializedProject outside a project, or Error::NotFound when the project’s row is missing.

enum Sub

source

enum Sub

The subcommands of gest project, one variant for each.

Variant Description
Archive(archive::Command) Soft-archive a project, hiding it and its entities from default list views.
Attach(attach::Command) Attach the current directory to an existing project as a workspace.
Delete(delete::Command) Delete a project and all of its owned entities.
Detach(detach::Command) Detach the current directory from its project.
List(list::Command) List all known projects.
Unarchive(unarchive::Command) Restore an archived project to active status.

Implements Debug, FromArgMatches, Subcommand.