Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use line_ending::LineEnding;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum SessionPlatform {
|
||||
MSYS2,
|
||||
WSL,
|
||||
Native,
|
||||
/// A shell running inside a Linux Docker sandbox container.
|
||||
DockerSandbox,
|
||||
}
|
||||
|
||||
impl SessionPlatform {
|
||||
#[allow(clippy::disallowed_methods)]
|
||||
pub fn default_line_ending(&self) -> LineEnding {
|
||||
match self {
|
||||
SessionPlatform::MSYS2 | SessionPlatform::WSL | SessionPlatform::DockerSandbox => {
|
||||
LineEnding::LF
|
||||
}
|
||||
SessionPlatform::Native => LineEnding::from_current_platform(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user