From 44bad997cbfe16bfff9115b926fdbed5749f60eb Mon Sep 17 00:00:00 2001 From: Valerie Date: Tue, 25 Jun 2024 14:05:28 -0400 Subject: [PATCH] context action now passes flags --- src/command/share.rs | 1 + src/flag.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/command/share.rs b/src/command/share.rs index fb89728..70019f5 100644 --- a/src/command/share.rs +++ b/src/command/share.rs @@ -74,6 +74,7 @@ pub fn context_action(state: &State) { let target = util::repo_fallback(); let mut args = Arguments::from_vec( vec![(&target).into()] ); let mut substate = State::new(&mut args); + substate.flags = state.flags.clone(); if util::session_exists(&target) { attach(&mut substate); } else { diff --git a/src/flag.rs b/src/flag.rs index e518724..6cf4987 100644 --- a/src/flag.rs +++ b/src/flag.rs @@ -37,5 +37,15 @@ impl Flags { } } + pub fn clone(&self) -> Flags { + Flags { + detached: self.detached, + nested: self.nested, + quiet: self.quiet, + read_only: self.read_only, + target: None + } + } + }