1#[derive(Clone, Copy, Debug, PartialEq, Eq, derive_more::Display)]
9#[display("{}", self.name())]
10pub enum ConfigFileKind {
11 Config,
12 Env,
13}
14
15impl ConfigFileKind {
16 pub const fn default(self) -> &'static str {
18 match self {
19 Self::Config => include_str!("../default_files/default_config.nu"),
20 Self::Env => include_str!("../default_files/default_env.nu"),
21 }
22 }
23
24 pub const fn scaffold(self) -> &'static str {
27 match self {
28 Self::Config => include_str!("../default_files/scaffold_config.nu"),
29 Self::Env => include_str!("../default_files/scaffold_env.nu"),
30 }
31 }
32
33 pub const fn doc(self) -> &'static str {
35 match self {
36 Self::Config => include_str!("../default_files/doc_config.nu"),
37 Self::Env => include_str!("../default_files/doc_env.nu"),
38 }
39 }
40
41 pub const fn name(self) -> &'static str {
43 match self {
44 Self::Config => "Config",
45 Self::Env => "Environment config",
46 }
47 }
48
49 pub const fn path(self) -> &'static str {
51 match self {
52 Self::Config => "config.nu",
53 Self::Env => "env.nu",
54 }
55 }
56
57 pub const fn default_path(self) -> &'static str {
60 match self {
61 Self::Config => "default_config.nu",
62 Self::Env => "default_env.nu",
63 }
64 }
65}