There was another Issue or PR or discussion somewhere about having Geany set environment variables, it seems like that would satisfy this purpose, right? Like whenever Geany updates the status bar it could call a function like (pseudo code):
```c void update_environment(GeanyDocument *doc) { g_setenv("GEANY_CURRENT_FILE", doc->real_path, TRUE); g_setenv("GEANY_CURRENT_LINE", ..., TRUE); g_setenv("GEANY_...", ..., TRUE); ... } ```
Which would work automatically for context action, custom commands and build commands all at once.