1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

make it easier to change php configuration

This commit is contained in:
Robin Appelman 2026-02-06 23:55:06 +01:00
commit 4bb6a21d7c
6 changed files with 71 additions and 0 deletions

View file

@ -99,6 +99,9 @@ pub enum HazeArgs {
filter: Option<String>,
path: String,
},
Reload {
filter: Option<String>,
},
}
#[derive(
@ -379,6 +382,7 @@ impl HazeArgs {
.ok_or_else(|| Report::msg("No path provided"))?
.into(),
}),
HazeCommand::Reload => Ok(HazeArgs::Reload { filter }),
}
}
}
@ -467,6 +471,11 @@ pub enum HazeCommand {
/// Edit a file in the instance with $EDITOR on the host
#[strum(props(Args = "[path] file to edit"))]
Edit,
/// Reload the php configuration in the instance
#[strum(props(
Details = "note: you can overwrite <yellow>php.ini</yellow> settings with <literal>haze</literal> <arg>[filter]</arg> <literal>edit /php.ini</literal>"
))]
Reload,
}
impl SubCommand for HazeCommand {
@ -484,6 +493,7 @@ impl SubCommand for HazeCommand {
| HazeCommand::Unpin
| HazeCommand::Env
| HazeCommand::Edit
| HazeCommand::Reload
)
}