Created
March 23, 2024 12:16
-
-
Save standarddeviant/4c96bfc757f2d7034f3c9ce14092056e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# search for 'pub fn' and capture paths, and lines | |
# NOTE: could get line number | |
let tmp = rg --json 'pub fn' | rg '"type":"match"' | from json -o | |
echo ($tmp | each {|m| $m.data}) # debug | |
let df = $tmp | each { | |
|m| { | |
path: $m.data.path.text, | |
line: ($m.data.lines.text | str trim) | |
} | |
} | |
echo $df |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment