mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Port before_v0.60/with_externals
and cleanup (#852)
This commit is contained in:
parent
840d723d89
commit
42732dad6a
6 changed files with 4 additions and 62 deletions
7
modules/with_externals/README.md
Normal file
7
modules/with_externals/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# With Externals
|
||||
|
||||
This folder includes various nushell scripts that require installing an external program in order to work.
|
||||
|
||||
### Contributing
|
||||
|
||||
Please include the name of the program and, if possible, basic installation instructions, as part of your script.
|
14
modules/with_externals/loc.nu
Normal file
14
modules/with_externals/loc.nu
Normal file
|
@ -0,0 +1,14 @@
|
|||
# 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
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue