diff --git a/docs/releasenotes/0next.md b/docs/releasenotes/0next.md index fc95ad6..913c0b0 100644 --- a/docs/releasenotes/0next.md +++ b/docs/releasenotes/0next.md @@ -1,43 +1,7 @@ -# WE STRICT NOW -### 2023.08.19 +## broken regex search now works -Parsing of commandline arguments are stricter -for the following commands: - - `i3fyra` - - `i3Kornhe` - - `i3viwiz` - - `i3flip` +fix for issue #211 . +Big thanks to @henryzxb for reporting -The change is related to the issue (#183). -Before this patch f.i. the command: `i3flip perv` -was valid and would flip the focus in the *previous* direction. -Because only the first character in the argument was used. - -Now this will result in an error: `perv` is not a valid direction. -Valid directions for this case would be "prev, p, previous". -Arguments are still case insensitive. - ---- - -A bugfix in `i3king` on the same theme is that, previously -it was possible to define a rule without a command (probably because of a typo/mistake: #207), -and this could lead to unpredictable bad behaviour and issues. -**Now** if a rule is defined without a command, it will be ignored -and proper error messages will be printed. - ---- - -I also fixed the bug related to workspace name of -i3fyra workspace for the 42'nd time. - ---- - -Finally a minor printf debugging improvement where -arguments to `--json` (usually a full `i3-msg -t -get_tree` string) is now replaced with `...` in -debugging stderr output. - ---- - -big thanks to @gmardom and @1ntronaut for reporting -and helping to troublehsoot the issues! +Allthough small, this change affects all i3ass commands, +except i3king. Hopefully we didn't break something. diff --git a/docs/releasenotes/2024.04.21.md b/docs/releasenotes/2024.04.21.md new file mode 100644 index 0000000..913c0b0 --- /dev/null +++ b/docs/releasenotes/2024.04.21.md @@ -0,0 +1,7 @@ +## broken regex search now works + +fix for issue #211 . +Big thanks to @henryzxb for reporting + +Allthough small, this change affects all i3ass commands, +except i3king. Hopefully we didn't break something. diff --git a/share/main.awk b/share/main.awk index f626323..6714c43 100644 --- a/share/main.awk +++ b/share/main.awk @@ -55,9 +55,12 @@ $(NF-1) ~ /"(class|current_border_width|floating|focus|focused|fullscreen_mode|i case "class": case "instance": case "type": + if (key in arg_search) { + gsub(/^"|"$/,"",$NF) + if (match($NF,arg_search[key])) + suspect_targets[cid]=1 + } ac[cid][key]=$NF - if ( key in arg_search && $NF == "\""arg_search[key]"\"" ) - suspect_targets[cid]=1 break case "id": diff --git a/src/i3Kornhe/config.mak b/src/i3Kornhe/config.mak index 9fb6bd0..b8de108 100644 --- a/src/i3Kornhe/config.mak +++ b/src/i3Kornhe/config.mak @@ -1,7 +1,7 @@ NAME := i3Kornhe -VERSION := 0.7 +VERSION := 0.71 CREATED := 2017-12-12 -UPDATED := 2023-07-22 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := options diff --git a/src/i3flip/config.mak b/src/i3flip/config.mak index 7baff57..deff676 100644 --- a/src/i3flip/config.mak +++ b/src/i3flip/config.mak @@ -1,7 +1,7 @@ NAME := i3flip -VERSION := 0.106 +VERSION := 0.107 CREATED := 2018-01-03 -UPDATED := 2023-08-13 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := i3flip [--move|-m] DIRECTION diff --git a/src/i3fyra/config.mak b/src/i3fyra/config.mak index 1d91f0f..467b074 100644 --- a/src/i3fyra/config.mak +++ b/src/i3fyra/config.mak @@ -1,7 +1,7 @@ NAME := i3fyra -VERSION := 1.4.2 +VERSION := 1.4.3 CREATED := 2017-01-14 -UPDATED := 2023-07-22 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := options diff --git a/src/i3get/awklib/END.awk b/src/i3get/awklib/END.awk index b6c13b5..15f0813 100644 --- a/src/i3get/awklib/END.awk +++ b/src/i3get/awklib/END.awk @@ -6,7 +6,7 @@ END { search_match=0 - for (search in arg_search) { + for (search in arg_search) { if (match(ac[suspect_id][search],arg_search[search])) search_match+=1 } @@ -39,7 +39,7 @@ END { case "c": k = "class" - v = gensub(/^"|"$/,"","g",ac[target_container_id]["class"]) + v = ac[target_container_id]["class"] out = gensub(/%v/,v,"g",format) out = gensub(/%k/,k,"g",out) printf ("%s", out) @@ -47,7 +47,7 @@ END { case "i": k = "instance" - v = gensub(/^"|"$/,"","g",ac[target_container_id]["instance"]) + v = ac[target_container_id]["instance"] out = gensub(/%v/,v,"g",format) out = gensub(/%k/,k,"g",out) printf ("%s", out) @@ -151,7 +151,7 @@ END { case "y": k = "type" - v = gensub(/^"|"$/,"","g",ac[target_container_id]["window_type"]) + v = ac[target_container_id]["window_type"] out = gensub(/%v/,v,"g",format) out = gensub(/%k/,k,"g",out) printf ("%s", out) @@ -161,7 +161,7 @@ END { k = "role" if ("window_role" in ac[target_container_id]) - v = gensub(/^"|"$/,"","g",ac[target_container_id]["window_role"]) + v = ac[target_container_id]["window_role"] else v = "unknown" diff --git a/src/i3get/config.mak b/src/i3get/config.mak index 38cfc08..83ccddc 100644 --- a/src/i3get/config.mak +++ b/src/i3get/config.mak @@ -1,7 +1,7 @@ NAME := i3get -VERSION := 0.83 +VERSION := 0.93 CREATED := 2017-03-08 -UPDATED := 2022-07-19 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := i3get [OPTIONS] diff --git a/src/i3list/config.mak b/src/i3list/config.mak index abf4fbf..aeacdd5 100644 --- a/src/i3list/config.mak +++ b/src/i3list/config.mak @@ -1,7 +1,7 @@ NAME := i3list -VERSION := 0.53 +VERSION := 0.54 CREATED := 2017-10-06 -UPDATED := 2023-07-12 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := options diff --git a/src/i3run/config.mak b/src/i3run/config.mak index 6bacf5b..310418b 100644 --- a/src/i3run/config.mak +++ b/src/i3run/config.mak @@ -1,7 +1,7 @@ NAME := i3run -VERSION := 0.2.1 +VERSION := 0.2.2 CREATED := 2017-04-20 -UPDATED := 2022-05-22 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := options diff --git a/src/i3viswiz/config.mak b/src/i3viswiz/config.mak index f3e247d..a75a0ea 100644 --- a/src/i3viswiz/config.mak +++ b/src/i3viswiz/config.mak @@ -1,7 +1,7 @@ NAME := i3viswiz -VERSION := 0.56 +VERSION := 0.57 CREATED := 2018-01-18 -UPDATED := 2023-07-22 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := options diff --git a/src/i3zen/config.mak b/src/i3zen/config.mak index b992512..099ec21 100644 --- a/src/i3zen/config.mak +++ b/src/i3zen/config.mak @@ -1,7 +1,7 @@ NAME := i3zen -VERSION := 0.2 +VERSION := 0.21 CREATED := 2017-09-11 -UPDATED := 2023-07-29 +UPDATED := 2024-04-21 AUTHOR := budRich CONTACT := https://github.com/budlabs/i3ass USAGE := $(NAME) [OPTIONS]