From 3836e70d682591a88d8e3c2c68a49ffba571c30a Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Wed, 6 Dec 2023 18:27:41 +0100 Subject: [PATCH] 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 --- sourced/misc/nu_defs.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sourced/misc/nu_defs.nu b/sourced/misc/nu_defs.nu index 00f0d5b..d2b6679 100644 --- a/sourced/misc/nu_defs.nu +++ b/sourced/misc/nu_defs.nu @@ -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