diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2022-06-25 21:48:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-25 21:48:00 +0200 |
| commit | 7ed66d3e785824b7a1ee363701931c232bde8b30 (patch) | |
| tree | 0d8778d2e9d20cd7f6da4c0b554f5a856fa259be /src/commands.rs | |
| parent | docs(changelog): allow hex colors for themes (diff) | |
| download | sl0ppij-7ed66d3e785824b7a1ee363701931c232bde8b30.tar.gz sl0ppij-7ed66d3e785824b7a1ee363701931c232bde8b30.tar.xz sl0ppij-7ed66d3e785824b7a1ee363701931c232bde8b30.zip | |
add(feature): `unstable` (#1542)
Add a feature `unstable`, which is intended to communicate the same
intent.
Gate: Send actions from cli with the `unstable` feature.
Diffstat (limited to 'src/commands.rs')
| -rw-r--r-- | src/commands.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/commands.rs b/src/commands.rs index ae3d4f84..4eaea23b 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -6,14 +6,13 @@ use crate::sessions::{ session_exists, ActiveSession, SessionNameMatch, }; use dialoguer::Confirm; -use miette::{IntoDiagnostic, Result}; +use miette::Result; use std::path::PathBuf; use std::process; use zellij_client::start_client as start_client_impl; use zellij_client::{os_input_output::get_client_os_input, ClientInfo}; use zellij_server::os_input_output::get_server_os_input; use zellij_server::start_server as start_server_impl; -use zellij_utils::input::actions::ActionsFromYaml; use zellij_utils::input::options::Options; use zellij_utils::nix; use zellij_utils::{ @@ -22,6 +21,11 @@ use zellij_utils::{ setup::{get_default_data_dir, Setup}, }; +#[cfg(feature = "unstable")] +use miette::IntoDiagnostic; +#[cfg(feature = "unstable")] +use zellij_utils::input::actions::ActionsFromYaml; + pub(crate) use crate::sessions::list_sessions; pub(crate) fn kill_all_sessions(yes: bool) { @@ -115,6 +119,7 @@ fn find_indexed_session( } /// Send a vec of `[Action]` to a currently running session. +#[cfg(feature = "unstable")] pub(crate) fn send_action_to_session(opts: zellij_utils::cli::CliArgs) { match get_active_session() { ActiveSession::None => { @@ -138,6 +143,7 @@ pub(crate) fn send_action_to_session(opts: zellij_utils::cli::CliArgs) { }; } +#[cfg(feature = "unstable")] fn attach_with_fake_client(opts: zellij_utils::cli::CliArgs, name: &str) { if let Some(zellij_utils::cli::Command::Sessions(zellij_utils::cli::Sessions::Action { action: Some(action), |
