Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 14 variants Feature { action: WorktreeAction, }, Bugfix { action: WorktreeAction, }, Hotfix { action: WorktreeAction, }, Spike { action: SpikeAction, }, Finish { name: Option<String>, force: bool, keep_remote: bool, }, Publish { name: Option<String>, remote: Option<String>, }, List, Run { name: Option<String>, command: Vec<String>, }, Open { name: Option<String>, }, Cd { name: Option<String>, }, Tag { version: Option<String>, }, Init { yes: bool, }, ShellHook { shell: String, }, Completion { shell: Shell, },
}

Variants§

§

Feature

Manage feature worktrees

Fields

§

Bugfix

Manage bugfix worktrees

Fields

§

Hotfix

Manage hotfix worktrees

Fields

§

Spike

Manage spike worktrees

Fields

§

Finish

Complete a worktree, run tests, merge into main, and clean up

Fields

§name: Option<String>

Worktree name (inferred from cwd if omitted)

§force: bool

Force completion even if pre-finish hooks fail

§keep_remote: bool

Keep remote branch on remote repository instead of deleting it

§

Publish

Publish a worktree branch to remote with upstream tracking

Fields

§name: Option<String>

Worktree name (inferred from cwd if omitted)

§remote: Option<String>

Remote repository name (defaults to origin)

§

List

List all active worktree slots

§

Run

Run an arbitrary command inside a worktree with environment injected

Fields

§name: Option<String>

Worktree name (inferred from cwd if omitted)

§command: Vec<String>

Shell command to execute

§

Open

Open the worktree in configured editor ($EDITOR or code/cursor)

Fields

§name: Option<String>

Worktree name (inferred from cwd if omitted)

§

Cd

Print the worktree path (usable with cd $(git claw cd ))

Fields

§name: Option<String>

Worktree name (inferred from cwd if omitted)

§

Tag

Create an annotated SemVer release tag on main (auto-infers version and changelog from Conventional Commits if omitted)

Fields

§version: Option<String>

SemVer version tag (e.g., v1.2.0; if omitted, automatically inferred from Conventional Commits)

§

Init

Initialize git-claw configuration for the current repository

Fields

§yes: bool

Automatically accept all inferred defaults without prompting

§

ShellHook

Output shell integration script for auto-cd navigation

Fields

§shell: String

Target shell (bash, zsh)

§

Completion

Generate shell auto-completion script

Fields

§shell: Shell

Target shell

Trait Implementations§

Source§

impl Clone for Commands

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Commands

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl PartialEq for Commands

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Commands

Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.