summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/layout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-utils/src/input/layout.rs')
-rw-r--r--zellij-utils/src/input/layout.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs
index ace471f8f..312286ec0 100644
--- a/zellij-utils/src/input/layout.rs
+++ b/zellij-utils/src/input/layout.rs
@@ -287,6 +287,7 @@ impl FromStr for PluginUserConfiguration {
pub enum RunPluginLocation {
File(PathBuf),
Zellij(PluginTag),
+ Remote(String),
}
impl Default for RunPluginLocation {
@@ -332,6 +333,7 @@ impl RunPluginLocation {
};
Ok(Self::File(path))
},
+ "https" | "http" => Ok(Self::Remote(url.as_str().to_owned())),
_ => Err(PluginsConfigError::InvalidUrlScheme(url)),
}
}
@@ -339,6 +341,7 @@ impl RunPluginLocation {
match self {
RunPluginLocation::File(pathbuf) => format!("file:{}", pathbuf.display()),
RunPluginLocation::Zellij(plugin_tag) => format!("zellij:{}", plugin_tag),
+ RunPluginLocation::Remote(url) => format!("remote:{}", url),
}
}
}
@@ -351,6 +354,7 @@ impl From<&RunPluginLocation> for Url {
path.clone().into_os_string().into_string().unwrap()
),
RunPluginLocation::Zellij(tag) => format!("zellij:{}", tag),
+ RunPluginLocation::Remote(url) => format!("remote:{}", url),
};
Self::parse(&url).unwrap()
}
@@ -364,8 +368,8 @@ impl fmt::Display for RunPluginLocation {
"{}",
path.clone().into_os_string().into_string().unwrap()
),
-
Self::Zellij(tag) => write!(f, "{}", tag),
+ Self::Remote(url) => write!(f, "{}", url),
}
}
}