1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00
nu_scripts/modules/with_externals/loc.nu

14 lines
358 B
Text

# This script requires that `tokei` be installed and available!
# Count lines of code in a project.
export def main [
...rest # args to pass to tokei
] {
tokei -o json ...$rest |
from json |
transpose |
rename lang lines |
insert files { get lines.reports | length } |
select lang files lines.code lines.comments lines.blanks
}