1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ShellError {
5 #[error("Shell detection failed: {0}")]
6 DetectionFailed(String),
7
8 #[error("Shell environment variable not found")]
9 NoShellVar,
10
11 #[error("Home directory not found")]
12 NoHomeDir,
13
14 #[error("Failed to access RC file: {0}")]
15 RcFileError(#[from] std::io::Error),
16
17 #[error("Unsupported platform")]
18 UnsupportedPlatform,
19
20 #[error("Failed to execute shell command")]
21 CommandFailed,
22
23 #[error("Invalid UTF-8 in shell output")]
24 InvalidUtf8Output,
25
26 #[error("ZDOTDIR environment variable is empty")]
27 EmptyZdotdir,
28
29 #[error("Home environment variable is empty")]
30 EmptyHomeEnvVar,
31
32 #[error("Home environment and ZDOTDIR variables are empty")]
33 EmptyHomeAndZdotdir,
34
35 #[error("RC file not found: {0}")]
36 RCFileNotFound(String),
37}