mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 01:58:51 +02:00
feat(core): use PathExt to unify env var resolution
This new implementation allows for expanding any environment variable so it is not limited to just `~`, `$HOME`, `$Env:USERPROFILE` and `$Env:KOMOREBI_CONFIG_HOME`. It expands the follwing formats: - CMD: `%variable%` - PowerShell: `$Env:variable` - Bash: `$variable` I searched throughout the code base for path and migrate any code that might need to PathExt::replace_env. It is possible that I might have missed a few places due to my unfamiliarity with the code base, so if you find any, please let me know. Most of the paths that needed this trait, are in: - Clap arguments, and that was handled by #[value_parse] attribute and a helper function. - SocketMessage and that was handled by custom deserialization with the help of serde_with crate
This commit is contained in:
@@ -12,7 +12,7 @@ pub use komorebi::config_generation::MatchingRule;
|
||||
pub use komorebi::config_generation::MatchingStrategy;
|
||||
pub use komorebi::container::Container;
|
||||
pub use komorebi::core::config_generation::ApplicationConfigurationGenerator;
|
||||
pub use komorebi::core::resolve_home_path;
|
||||
pub use komorebi::core::replace_env_in_path;
|
||||
pub use komorebi::core::AnimationStyle;
|
||||
pub use komorebi::core::ApplicationIdentifier;
|
||||
pub use komorebi::core::Arrangement;
|
||||
|
||||
Reference in New Issue
Block a user