Skip to main content

slox_cli/
lib.rs

1use clap::{Parser, Subcommand};
2
3#[derive(Parser, Debug)]
4pub struct Args {
5    #[command(subcommand)]
6    pub command: Commands,
7}
8
9#[derive(Subcommand, Debug, Clone, PartialEq, Eq)]
10pub enum Commands {
11    Env {
12        #[command(subcommand)]
13        command: EnvCommand,
14    },
15    Activate {
16        #[command(subcommand)]
17        command: ActivateCommand,
18    },
19    Pkg {
20        #[command(subcommand)]
21        command: PkgCommand,
22    },
23}
24
25#[derive(Subcommand, Debug, Clone, PartialEq, Eq)]
26pub enum ActivateCommand {
27    Sh,
28    Bash,
29    Zsh,
30    Nu,
31}
32
33#[derive(Subcommand, Debug, Clone, PartialEq, Eq)]
34pub enum EnvCommand {
35    Add { path: String },
36    Remove { path: String },
37    Set { path: String },
38}
39
40#[derive(Subcommand, Debug, Clone, PartialEq, Eq)]
41pub enum PkgCommand {
42    Add { path: String },
43    Remove { path: String },
44}