pub struct RepositionCommand {
pub paths: Vec<PathBuf>,
pub reference: Option<PathBuf>,
pub dry_run: bool,
pub undo: bool,
pub output: TableOrJson,
pub socket: Option<PathBuf>,
}Expand description
Moves and resizes worktrees’ open VS Code windows to match a reference window’s geometry (#1407).
The CLI counterpart of the tree view’s “Reposition Windows to Match”, and the
diagnostic surface for it: --dry-run reports exactly which OS window each
worktree resolved to without touching anything, which is how a title-matching
problem is diagnosed.
Paths, not window keys, are the CLI’s currency (as for focus/close), so a
list call up front maps each folder to the key of the window that has it
open. The daemon does all the OS work — it holds the macOS Accessibility grant,
which a terminal-launched process would not.
Fields§
§paths: Vec<PathBuf>Worktree folders whose windows to move. Each is canonicalized client-side, as the daemon runs in a different cwd and matches by canonical path.
reference: Option<PathBuf>The worktree whose window supplies the target position and size. It is never itself moved.
dry_run: boolReport which window each worktree resolves to and stop; move nothing.
undo: boolPut the windows the last reposition moved back where they were.
output: TableOrJsonOutput format.
socket: Option<PathBuf>Control-socket path. Defaults to the per-user runtime location.
Implementations§
Trait Implementations§
Source§impl Args for RepositionCommand
impl Args for RepositionCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for RepositionCommand
impl CommandFactory for RepositionCommand
Source§impl FromArgMatches for RepositionCommand
impl FromArgMatches for RepositionCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for RepositionCommand
impl Parser for RepositionCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for RepositionCommand
impl RefUnwindSafe for RepositionCommand
impl Send for RepositionCommand
impl Sync for RepositionCommand
impl Unpin for RepositionCommand
impl UnsafeUnpin for RepositionCommand
impl UnwindSafe for RepositionCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more