mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Change uses of size
to str stats
(#647)
Deprecation will be released with `0.87` - ~~https://github.com/nushell/nushell/pull/10772~~ - https://github.com/nushell/nushell/pull/10798 Final removal in `0.88` Land before: - https://github.com/nushell/nushell/pull/10784
This commit is contained in:
parent
bc309ff07d
commit
3836e70d68
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ def 'nu-sloc' [] {
|
|||
let stats = (
|
||||
ls **/*.nu
|
||||
| select name
|
||||
| insert lines { |it| open $it.name | size | get lines }
|
||||
| insert lines { |it| open $it.name | str stats | get lines }
|
||||
| insert blank {|s| $s.lines - (open $s.name | lines | find --regex '\S' | length) }
|
||||
| insert comments {|s| open $s.name | lines | find --regex '^\s*#' | length }
|
||||
| sort-by lines -r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue