summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-02-21 10:17:06 +0100
committerAram Drevekenin <aram@poor.dev>2024-02-21 10:17:06 +0100
commit46886c12d41fbad151a4c5712c7188c4c985459a (patch)
treeabe83aa29fdf3ab3526b36e28e41ef4503f7737a
parent8183fe1f1cef448aecc57a1024d63d24b89c0763 (diff)
style(code): cleanups
-rw-r--r--zellij-server/src/panes/floating_panes/mod.rs25
-rw-r--r--zellij-server/src/panes/tiled_panes/mod.rs28
-rw-r--r--zellij-server/src/plugins/mod.rs19
-rw-r--r--zellij-server/src/plugins/unit/plugin_tests.rs8
-rw-r--r--zellij-server/src/plugins/zellij_exports.rs12
-rw-r--r--zellij-server/src/screen.rs11
-rw-r--r--zellij-server/src/session_layout_metadata.rs1
-rw-r--r--zellij-server/src/tab/layout_applier.rs15
-rw-r--r--zellij-server/src/tab/mod.rs43
-rw-r--r--zellij-server/src/unit/screen_tests.rs8
-rw-r--r--zellij-utils/src/cli.rs1
-rw-r--r--zellij-utils/src/input/actions.rs25
-rw-r--r--zellij-utils/src/input/layout.rs26
-rw-r--r--zellij-utils/src/kdl/kdl_layout_parser.rs22
-rw-r--r--zellij-utils/src/kdl/mod.rs14
-rw-r--r--zellij-utils/src/plugin_api/action.rs61
16 files changed, 55 insertions, 264 deletions
diff --git a/zellij-server/src/panes/floating_panes/mod.rs b/zellij-server/src/panes/floating_panes/mod.rs
index 572a75629..37e660253 100644
--- a/zellij-server/src/panes/floating_panes/mod.rs
+++ b/zellij-server/src/panes/floating_panes/mod.rs
@@ -873,28 +873,9 @@ impl FloatingPanes {
}
}
pub fn get_plugin_pane_id(&self, run_plugin_or_alias: &RunPluginOrAlias) -> Option<PaneId> {
- match run_plugin_or_alias {
- RunPluginOrAlias::RunPlugin(..) => {
- let run = Some(Run::Plugin(run_plugin_or_alias.clone()));
- self.panes
- .iter()
- .find(|(_id, s_p)| s_p.invoked_with() == &run)
- .map(|(id, _)| *id)
- }
- RunPluginOrAlias::Alias(plugin_alias) => {
- self.panes
- .iter()
- .find(|(_id, s_p)| {
- match s_p.invoked_with() {
- // Some(Run::Plugin(RunPluginOrAlias::Alias(pane_alias))) => pane_alias.name == plugin_alias.name,
- Some(Run::Plugin(RunPluginOrAlias::Alias(pane_alias))) => pane_alias.name == plugin_alias.name &&
- pane_alias.configuration.as_ref().and_then(|c| if c.inner().is_empty() { None } else { Some(c)} ) == plugin_alias.configuration.as_ref().and_then(|c| if c.inner().is_empty() { None } else { Some(c) }),
- _ => false
- }
- })
- .map(|(id, _)| *id)
- }
- }
+ self.panes.iter()
+ .find(|(_id, pane)| run_plugin_or_alias.is_equivalent_to_run(pane.invoked_with()))
+ .map(|(id, _)| *id)
}
pub fn focus_pane_if_exists(&mut self, pane_id: PaneId, client_id: ClientId) -> Result<()> {
if self.panes.get(&pane_id).is_some() {
diff --git a/zellij-server/src/panes/tiled_panes/mod.rs b/zellij-server/src/panes/tiled_panes/mod.rs
index be973444a..7292644e3 100644
--- a/zellij-server/src/panes/tiled_panes/mod.rs
+++ b/zellij-server/src/panes/tiled_panes/mod.rs
@@ -1745,30 +1745,10 @@ impl TiledPanes {
self.client_id_to_boundaries.clear();
}
pub fn get_plugin_pane_id(&self, run_plugin_or_alias: &RunPluginOrAlias) -> Option<PaneId> {
- match run_plugin_or_alias {
- RunPluginOrAlias::RunPlugin(..) => {
- let run = Some(Run::Plugin(run_plugin_or_alias.clone()));
- self.panes
- .iter()
- .find(|(_id, s_p)| s_p.invoked_with() == &run)
- .map(|(id, _)| *id)
- }
- RunPluginOrAlias::Alias(plugin_alias) => {
- eprintln!("plugin_alias: {:?}", plugin_alias);
- self.panes
- .iter()
- .find(|(_id, s_p)| {
- eprintln!("comparing with: {:?}", s_p.invoked_with());
- match s_p.invoked_with() {
- Some(Run::Plugin(RunPluginOrAlias::Alias(pane_alias))) => pane_alias.name == plugin_alias.name &&
- pane_alias.configuration.as_ref().and_then(|c| if c.inner().is_empty() { None } else { Some(c)} ) == plugin_alias.configuration.as_ref().and_then(|c| if c.inner().is_empty() { None } else { Some(c) }),
- // Some(Run::Plugin(RunPluginOrAlias::Alias(pane_alias))) => pane_alias.name == plugin_alias.name && pane_alias.configuration == plugin_alias.configuration,
- _ => false
- }
- })
- .map(|(id, _)| *id)
- }
- }
+ self.panes.iter()
+ .find(|(_id, pane)| run_plugin_or_alias.is_equivalent_to_run(pane.invoked_with()))
+ .map(|(id, _)| *id)
+
}
pub fn pane_info(&self) -> Vec<PaneInfo> {
let mut pane_infos = vec![];
diff --git a/zellij-server/src/plugins/mod.rs b/zellij-server/src/plugins/mod.rs
index 5c5903bc2..5179c6f00 100644
--- a/zellij-server/src/plugins/mod.rs
+++ b/zellij-server/src/plugins/mod.rs
@@ -237,7 +237,6 @@ pub(crate) fn plugin_thread_main(
cwd,
skip_cache,
) => {
- log::info!("run_plugin_or_alias: {:?}", run_plugin_or_alias);
run_plugin_or_alias.populate_run_plugin_if_needed(&plugin_aliases);
let run_plugin = run_plugin_or_alias.get_run_plugin();
match wasm_bridge.load_plugin(
@@ -349,8 +348,7 @@ pub(crate) fn plugin_thread_main(
RunPluginOrAlias,
Vec<PluginId>,
> = HashMap::new();
- tab_layout = tab_layout.or_else(|| Some(layout.new_tab().0)); // TODO: does this ruin the
- // universe???
+ tab_layout = tab_layout.or_else(|| Some(layout.new_tab().0));
tab_layout.as_mut().map(|t| t.populate_plugin_aliases_in_layout(&plugin_aliases));
floating_panes_layout
.iter_mut().for_each(|f| {
@@ -373,16 +371,7 @@ pub(crate) fn plugin_thread_main(
.collect();
extracted_run_instructions.append(&mut extracted_floating_plugins);
for run_instruction in extracted_run_instructions {
- // if let Some(Run::Plugin(run)) = run_instruction {
- // TODO: handle plugin alias
- // if let Some(Run::Plugin(RunPluginOrAlias::RunPlugin(run))) = run_instruction {
if let Some(Run::Plugin(run_plugin_or_alias)) = run_instruction {
- // TODO: add the ability to add an alias to plugin_ids, then add the
- // alias here and get a new plugin id from wasm_bridge
- // (wasm_bridge.plugin_not_found(alias)?)
- // then when applying the layout get it from there if it is None
- // the above method should use the error capabilities to send a plugin
- // not found message to said pane
let run_plugin = run_plugin_or_alias.get_run_plugin();
let skip_cache = false;
let (plugin_id, _client_id) = wasm_bridge.load_plugin(
@@ -713,11 +702,7 @@ fn pipe_to_specific_plugins(
let is_private = true;
let size = Size::default();
match RunPluginOrAlias::from_url(&plugin_url, configuration, Some(plugin_aliases), cwd.clone()) {
- // match RunPlugin::from_url(&plugin_url) {
Ok(run_plugin_or_alias) => {
-// if let Some(configuration) = configuration {
-// run_plugin.configuration = PluginUserConfiguration::new(configuration.clone());
-// }
let all_plugin_ids = wasm_bridge.get_or_load_plugins(
run_plugin_or_alias,
size,
@@ -733,7 +718,7 @@ fn pipe_to_specific_plugins(
pipe_messages.push((
Some(plugin_id),
client_id,
- PipeMessage::new(pipe_source.clone(), name, payload, args, is_private), // PipeMessage::new(PipeSource::Cli(pipe_id.clone()), &name, &payload, &args, is_private)
+ PipeMessage::new(pipe_source.clone(), name, payload, args, is_private),
));
}
},
diff --git a/zellij-server/src/plugins/unit/plugin_tests.rs b/zellij-server/src/plugins/unit/plugin_tests.rs
index 5b2c71feb..d8ef6ca2e 100644
--- a/zellij-server/src/plugins/unit/plugin_tests.rs
+++ b/zellij-server/src/plugins/unit/plugin_tests.rs
@@ -633,14 +633,6 @@ pub fn load_new_plugin_with_plugin_alias() {
let (plugin_thread_sender, screen_receiver, teardown) = create_plugin_thread(None);
let plugin_should_float = Some(false);
let plugin_title = Some("test_plugin".to_owned());
- // TODO: CONTINUE HERE (16/2)
- // - add an alias version of this test - DONE
- // - then make a version of the layout_with_plugin_panes test that also includes aliases (or
- // add it to that test?) - N/A
- // - then look through this file to see what other tests we can add, then look at more tests
- // in these files:
- // - plugin_tests
- // - screen_tests
let run_plugin = RunPluginOrAlias::Alias(PluginAlias {
name: "fixture_plugin_for_tests".to_owned(),
configuration: Default::default(),
diff --git a/zellij-server/src/plugins/zellij_exports.rs b/zellij-server/src/plugins/zellij_exports.rs
index 89fe8fcb8..c0c5e5999 100644
--- a/zellij-server/src/plugins/zellij_exports.rs
+++ b/zellij-server/src/plugins/zellij_exports.rs
@@ -27,8 +27,6 @@ use zellij_utils::{
ipc::{ClientToServerMsg, IpcSenderWithContext},
};
-use url::Url;
-
use crate::{panes::PaneId, screen::ScreenInstruction};
use zellij_utils::{
@@ -41,7 +39,7 @@ use zellij_utils::{
input::{
actions::Action,
command::{RunCommand, RunCommandAction, TerminalAction},
- layout::{Layout, PluginUserConfiguration, RunPlugin, RunPluginOrAlias, RunPluginLocation},
+ layout::{Layout, RunPluginOrAlias},
plugins::PluginType,
},
plugin_api::{
@@ -1226,14 +1224,6 @@ fn start_or_reload_plugin(env: &ForeignFunctionEnv, url: &str) -> Result<()> {
)
};
let cwd = std::env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
- // let url = Url::parse(&url).map_err(|e| anyhow!("Failed to parse url: {}", e))?;
-// let run_plugin_location = RunPluginLocation::parse(url.as_str(), Some(cwd))
-// .map_err(|e| anyhow!("Failed to parse plugin location: {}", e))?;
-// let run_plugin = RunPlugin {
-// location: run_plugin_location,
-// _allow_exec_host_cmd: false,
-// configuration: PluginUserConfiguration::new(BTreeMap::new()), // TODO: allow passing configuration
-// };
let run_plugin_or_alias = RunPluginOrAlias::from_url(url, &None, None, Some(cwd))
.map_err(|e| anyhow!("Failed to parse plugin location: {}", e))?;
let action = Action::StartOrReloadPlugin(run_plugin_or_alias);
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index d0789e9ce..5faba40c4 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -19,7 +19,7 @@ use zellij_utils::{
envs::set_session_name,
input::command::TerminalAction,
input::layout::{
- FloatingPaneLayout, Layout, PluginUserConfiguration, Run, RunPlugin, RunPluginOrAlias, RunPluginLocation,
+ FloatingPaneLayout, Layout, Run, RunPlugin, RunPluginOrAlias, RunPluginLocation,
SwapFloatingLayout, SwapTiledLayout, TiledPaneLayout,
},
position::Position,
@@ -1269,7 +1269,6 @@ impl Screen {
};
// apply the layout to the new tab
- eprintln!("here, right?");
self.tabs
.get_mut(&tab_index)
.context("couldn't find tab with index {tab_index}")
@@ -1747,16 +1746,13 @@ impl Screen {
client_id: ClientId,
) -> Result<bool> {
// true => found and focused, false => not
- log::info!("focus_plugin_pane");
let err_context = || format!("failed to focus_plugin_pane");
let mut tab_index_and_plugin_pane_id = None;
let mut plugin_pane_to_move_to_active_tab = None;
let focused_tab_index = *self.active_tab_indices.get(&client_id).unwrap_or(&0);
let all_tabs = self.get_tabs_mut();
for (tab_index, tab) in all_tabs.iter_mut() {
- log::info!("finding plugin...");
if let Some(plugin_pane_id) = tab.find_plugin(&run_plugin) {
- log::info!("found it!");
tab_index_and_plugin_pane_id = Some((*tab_index, plugin_pane_id));
if move_to_focused_tab && focused_tab_index != *tab_index {
plugin_pane_to_move_to_active_tab =
@@ -2847,7 +2843,6 @@ pub(crate) fn screen_thread_main(
swap_layouts,
client_id,
) => {
- log::info!("ScreenInstruction::NewTab");
let tab_index = screen.get_new_tab_index();
pending_tab_ids.insert(tab_index);
screen.new_tab(tab_index, swap_layouts, tab_name.clone(), client_id)?;
@@ -2872,7 +2867,6 @@ pub(crate) fn screen_thread_main(
tab_index,
client_id,
) => {
- eprintln!("ScreenInstruction::ApplyLayout: {:?}", new_plugin_ids);
screen.apply_layout(
layout,
floating_panes_layout,
@@ -3517,18 +3511,15 @@ pub(crate) fn screen_thread_main(
});
match client_id_and_focused_tab {
Some((tab_index, client_id)) => {
- eprintln!("focus plugin pane??: {:?}", run_plugin);
if screen.focus_plugin_pane(
&run_plugin,
should_float,
move_to_focused_tab,
client_id,
)? {
- eprintln!("can has focus plugin pane");
screen.render(None)?;
screen.log_and_report_session_state()?;
} else {
- eprintln!("no!!");
screen
.bus
.senders
diff --git a/zellij-server/src/session_layout_metadata.rs b/zellij-server/src/session_layout_metadata.rs
index 9bd2d9c87..f760bdb4d 100644
--- a/zellij-server/src/session_layout_metadata.rs
+++ b/zellij-server/src/session_layout_metadata.rs
@@ -178,7 +178,6 @@ impl SessionLayoutMetadata {
let mut update_cmd_in_pane_metadata = |pane_layout_metadata: &mut PaneLayoutMetadata| {
if let PaneId::Plugin(id) = pane_layout_metadata.id {
if let Some(run_plugin) = plugin_ids_to_run_plugins.remove(&id) {
- // TODO: handle plugin alias
pane_layout_metadata.run = Some(Run::Plugin(RunPluginOrAlias::RunPlugin(run_plugin)));
}
}
diff --git a/zellij-server/src/tab/layout_applier.rs b/zellij-server/src/tab/layout_applier.rs
index 4f5246d33..bd0468a60 100644
--- a/zellij-server/src/tab/layout_applier.rs
+++ b/zellij-server/src/tab/layout_applier.rs
@@ -19,7 +19,7 @@ use std::rc::Rc;
use zellij_utils::{
data::{Palette, Style},
input::layout::{
- FloatingPaneLayout, PluginUserConfiguration, Run, RunPluginOrAlias, RunPluginLocation, TiledPaneLayout,
+ FloatingPaneLayout, Run, RunPluginOrAlias, TiledPaneLayout,
},
pane_size::{Offset, PaneGeom, Size, SizeInPixels, Viewport},
};
@@ -107,19 +107,16 @@ impl<'a> LayoutApplier<'a> {
mut new_plugin_ids: HashMap<RunPluginOrAlias, Vec<u32>>,
client_id: ClientId,
) -> Result<bool> {
- eprintln!("apply_layout 1: {:?}", new_plugin_ids);
// true => should_show_floating_panes
let layout_name = layout.name.clone();
let hide_floating_panes = layout.hide_floating_panes;
self.apply_tiled_panes_layout(layout, new_terminal_ids, &mut new_plugin_ids, client_id)?;
- eprintln!("apply_layout 2");
let layout_has_floating_panes = self.apply_floating_panes_layout(
floating_panes_layout,
new_floating_terminal_ids,
&mut new_plugin_ids,
layout_name,
)?;
- eprintln!("apply_layout 3");
let should_show_floating_panes = layout_has_floating_panes && !hide_floating_panes;
return Ok(should_show_floating_panes);
}
@@ -265,17 +262,12 @@ impl<'a> LayoutApplier<'a> {
// we got from the plugin thread and pty thread
let positions_and_size = positions_in_layout.iter();
for (layout, position_and_size) in positions_and_size {
- // if let Some(Run::Plugin(run)) = layout.run.clone() {
- // if let Some(run_plugin) = layout.run.as_ref().and_then(|r| r.get_run_plugin()) {
if let Some(Run::Plugin(run)) = layout.run.clone() {
let pane_title = run.location_string();
- eprintln!("new_plugin_ids: {:#?}, \nrun: {:#?}", new_plugin_ids, run);
let pid = new_plugin_ids
- // .get_mut(&(run_plugin.location, run_plugin.configuration))
.get_mut(&run)
.and_then(|ids| ids.pop())
.with_context(err_context)?;
- eprintln!("not here!");
let mut new_plugin = PluginPane::new(
pid,
*position_and_size,
@@ -384,7 +376,6 @@ impl<'a> LayoutApplier<'a> {
layout_name: Option<String>,
) -> Result<bool> {
// true => has floating panes
- eprintln!("apply_floating_panes_layout 1");
let err_context = || format!("Failed to apply_floating_panes_layout");
let mut layout_has_floating_panes = false;
let floating_panes_layout = floating_panes_layout.iter();
@@ -401,14 +392,11 @@ impl<'a> LayoutApplier<'a> {
position_and_size,
);
} else if let Some(Run::Plugin(run)) = floating_pane_layout.run.clone() {
- // } else if let Some(run_plugin) = floating_pane_layout.run.as_ref().and_then(|r| r.get_run_plugin()) {
- eprintln!("apply_floating_panes_layout 2: {:?}", new_plugin_ids);
let pane_title = run.location_string();
let pid = new_plugin_ids
.get_mut(&run)
.and_then(|ids| ids.pop())
.with_context(err_context)?;
- eprintln!("apply_floating_panes_layout 3");
let mut new_pane = PluginPane::new(
pid,
position_and_size,
@@ -443,7 +431,6 @@ impl<'a> LayoutApplier<'a> {
self.senders,
self.character_cell_size
)?;
- eprintln!("apply_floating_panes_layout 4");
self.floating_panes
.add_pane(PaneId::Plugin(pid), Box::new(new_pane));
if floating_pane_layout.focus.unwrap_or(false) {
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index 585726081..de0ee7240 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -3588,41 +3588,13 @@ impl Tab {
}
pub fn find_plugin(&self, run_plugin_or_alias: &RunPluginOrAlias) -> Option<PaneId> {
- // let run = Some(Run::Plugin(run_plugin_or_alias.clone()));
self.tiled_panes
.get_plugin_pane_id(run_plugin_or_alias)
.or_else(|| self.floating_panes.get_plugin_pane_id(run_plugin_or_alias))
.or_else(|| {
-
- // TODO: can we somehow outsource this piece of code?
- match run_plugin_or_alias {
- RunPluginOrAlias::RunPlugin(..) => {
- let run = Some(Run::Plugin(run_plugin_or_alias.clone()));
- self.suppressed_panes
- .iter()
- .find(|(_id, (_, s_p))| s_p.invoked_with() == &run)
- .map(|(id, _)| *id)
- }
- RunPluginOrAlias::Alias(plugin_alias) => {
- self.suppressed_panes
- .iter()
- .find(|(_id, (_, s_p))| {
- match s_p.invoked_with() {
- Some(Run::Plugin(RunPluginOrAlias::Alias(pane_alias))) => pane_alias.name == plugin_alias.name && pane_alias.configuration == plugin_alias.configuration,
- _ => false
- }
- })
- .map(|(id, _)| *id)
- }
- }
-
-
-
-// self.suppressed_panes
-// .iter()
-// // TODO: compare properly like in tiled_panes/floating_panes
-// .find(|(_id, s_p)| s_p.1.invoked_with() == &run)
-// .map(|(id, _)| *id)
+ self.suppressed_panes.iter()
+ .find(|(_id, (_, pane))| run_plugin_or_alias.is_equivalent_to_run(pane.invoked_with()))
+ .map(|(id, _)| *id)
})
}
@@ -3797,15 +3769,6 @@ pub fn pane_info_for_pane(pane_id: &PaneId, pane: &Box<dyn Pane>) -> PaneInfo {
pane_info.plugin_url = pane.invoked_with().as_ref().and_then(|c| match c {
Run::Plugin(run_plugin_or_alias) => {
Some(run_plugin_or_alias.location_string())
-// match run_plugin_or_alias {
-// RunPluginOrAlias::RunPlugin(run_plugin) => {
-// Some(run_plugin.location.to_string())
-// }
-// RunPluginOrAlias::Alias(alias) => {
-// // TODO: handle alias
-// unimplemented!()
-// }
-// }
}
_ => None,
});
diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs
index 52486e31d..87fd51bcb 100644
--- a/zellij-server/src/unit/screen_tests.rs
+++ b/zellij-server/src/unit/screen_tests.rs
@@ -355,7 +355,6 @@ impl MockScreen {
default_shell,
Some(pane_layout.clone()),
initial_floating_panes_layout.clone(),
- // vec![], // floating_panes_layout
tab_name,
(vec![], vec![]), // swap layouts
self.main_client_id,
@@ -363,10 +362,8 @@ impl MockScreen {
let _ = self.to_screen.send(ScreenInstruction::ApplyLayout(
pane_layout,
initial_floating_panes_layout,
- // vec![], // floating panes layout
pane_ids,
floating_pane_ids,
- // vec![], // floating pane ids
plugin_ids,
tab_index,
self.main_client_id,
@@ -442,7 +439,6 @@ impl MockScreen {
default_shell,
Some(pane_layout.clone()),
initial_floating_panes_layout.clone(),
- // vec![], // floating_panes_layout
tab_name,
(vec![], vec![]), // swap layouts
self.main_client_id,
@@ -450,10 +446,8 @@ impl MockScreen {
let _ = self.to_screen.send(ScreenInstruction::ApplyLayout(
pane_layout,
initial_floating_panes_layout,
- // vec![], // floating panes layout
pane_ids,
floating_pane_ids,
- // vec![], // floating pane ids
plugin_ids,
tab_index,
self.main_client_id,
@@ -2967,7 +2961,6 @@ pub fn send_cli_launch_or_focus_plugin_action_when_plugin_is_already_loaded_for_
in_place: false,
move_to_focused_tab: true,
url: "fixture_plugin_for_tests".to_owned(),
- // url: url::Url::parse("file:/path/to/fake/plugin").unwrap(),
configuration: Default::default(),
skip_plugin_cache: false,
};
@@ -3335,7 +3328,6 @@ pub fn screen_can_break_floating_plugin_pane_to_a_new_tab() {
size,
);
let snapshot_count = snapshots.len();
- eprintln!("snapshots: {:#?}", snapshots);
for (_cursor_coordinates, snapshot) in snapshots {
assert_snapshot!(format!("{}", snapshot));
}
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index e6caa19e8..e5b65d394 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -627,7 +627,6 @@ pub enum CliAction {
in_place: bool,
#[clap(short, long, value_parser)]
move_to_focused_tab: bool,
- // url: Url,
url: String,
#[clap(short, long, value_parser)]
configuration: Option<PluginUserConfiguration>,
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs
index 2d7a7d0a5..db965747c 100644
--- a/zellij-utils/src/input/actions.rs
+++ b/zellij-utils/src/input/actions.rs
@@ -5,7 +5,6 @@ use super::layout::{
FloatingPaneLayout, Layout, RunPlugin, RunPluginLocation, PluginAlias, SwapFloatingLayout, SwapTiledLayout,
TiledPaneLayout, RunPluginOrAlias
};
-use super::plugins::PluginsConfigError;
use crate::cli::CliAction;
use crate::data::{Direction, Resize};
use crate::data::{FloatingPaneCoordinates, InputMode};
@@ -581,14 +580,6 @@ impl Action {
CliAction::StartOrReloadPlugin { url, configuration } => {
let current_dir = get_current_dir();
let run_plugin_or_alias = RunPluginOrAlias::from_url(&url, &configuration.map(|c| c.inner().clone()), None, Some(current_dir))?;
-// let run_plugin_location = RunPluginLocation::parse(&url, Some(current_dir))
-// .map_err(|e| format!("Failed to parse plugin location: {}", e))?;
-// let run