Merge remote-tracking branch 'cd/master'
This commit is contained in:
commit
037cefc30a
@ -54,7 +54,8 @@ pkgs.writeDashBin "logf" ''
|
|||||||
|
|
||||||
# anaphoric gsub
|
# anaphoric gsub
|
||||||
def agsub(re; f):
|
def agsub(re; f):
|
||||||
gsub("(?<it>\(re))"; .it | f);
|
# Don't try empty regex: https://github.com/stedolan/jq/issues/1206
|
||||||
|
when(re != ""; gsub("(?<it>\(re))"; .it | f));
|
||||||
|
|
||||||
# :: [int] -> sgr
|
# :: [int] -> sgr
|
||||||
def sgr: "\u001b[\(map(tostring) | join(";"))m";
|
def sgr: "\u001b[\(map(tostring) | join(";"))m";
|
||||||
|
Loading…
Reference in New Issue
Block a user