snm_core/shell/mod.rs
1pub mod bash;
2pub mod fish;
3pub mod pwsh;
4pub mod zsh;
5
6use clap::Clap;
7use std::path::Path;
8
9pub trait Shell {
10 fn path(&self, path: &Path, append: bool) -> String;
11 fn env_var(&self, name: &str, val: &str) -> String;
12 fn use_on_cd(&self) -> &'static str;
13}
14
15#[derive(Debug, Clap, PartialEq, Eq)]
16pub enum ShellKind {
17 /// Setup the bash shell environment
18 Bash,
19
20 /// Setup the zsh shell environment
21 Zsh,
22
23 /// Setup the fish shell environment
24 Fish,
25
26 /// Setup the Windows Powershell environment
27 Pwsh,
28}