mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-08-17 01:10:36 +03: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
@ -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…
Reference in New Issue
Block a user