Files
dotfiles/dot_config/nushell/nu_scripts/modules/with_externals/loc.nu
Cian Hughes 896af887ca Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
2024-11-07 13:52:17 +00:00

15 lines
358 B
Nu

# 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
}