1
1
mirror of https://github.com/wader/fq.git synced 2024-09-20 08:18:51 +03:00

internal: _global_var returns new value instead of _global_state

This commit is contained in:
Mattias Wadman 2021-08-20 14:48:54 +02:00
parent 80eaa4637e
commit d9b45ba1ec

View File

@ -18,7 +18,7 @@ def _error_str: "error: \(.)";
def _errorln: ., "\n" | stderr;
def _global_var($k): _global_state[$k];
def _global_var($k; f): _global_state(_global_state | .[$k] |= f);
def _global_var($k; f): _global_state(_global_state | .[$k] |= f) | .[$k];
def _include_paths: _global_var("include_paths");
def _include_paths(f): _global_var("include_paths"; f);