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:
Stefan Holderbach 2023-12-06 18:27:41 +01:00 committed by GitHub
parent bc309ff07d
commit 3836e70d68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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