fix(ahk): quote app ids in generated code

Previously, generated AHK did not surround with quotes inputs which
could contain spaces such as application titles. This commit ensures
that in any generated AHK code where an application id is passed to a
komorebic.exe command as input, that input will always be quoted.

This fixes bugs related to float rules, manage rules and other
application identification commands not being properly executed via
komorebic called from the generated AHK files when the app id contained
a space.
This commit is contained in:
LGUG2Z
2022-04-15 12:22:18 -07:00
parent 839f8c9bf7
commit fad4cbf019
3 changed files with 23 additions and 14 deletions

View File

@@ -692,7 +692,10 @@ fn main() -> Result<()> {
.truncate(true)
.open(library.clone())?;
file.write_all(SubCommand::generate_ahk_library().as_bytes())?;
let output: String = SubCommand::generate_ahk_library();
let fixed_output = output.replace("%id%", "\"%id%\"");
file.write_all(fixed_output.as_bytes())?;
println!(
"\nAHK helper library for komorebic written to {}",