diff --git a/modules/network/remoting/remoting.nu b/modules/network/remoting/remoting.nu index 7ef7733..2aaba27 100644 --- a/modules/network/remoting/remoting.nu +++ b/modules/network/remoting/remoting.nu @@ -22,7 +22,7 @@ def "nu-complete hosts" [] { } def "nu-complete scripts" [] { - $nu.scope.commands + scope commands |where is_custom |get -i command } @@ -62,7 +62,7 @@ export def "ssh script" [ ...args # arguments you wish to pass to the script in key=value format ] { let span = (metadata $script).span - if $script in ($nu.scope.commands|where is_custom|get command) { + if $script in (scope commands|where is_custom|get command) { let host = (hosts|where name == $hostname|get 0) let full_command = (build-string (view-source $script) '; ' $script ' ' ($args|str join ' ') '|to json -r') diff --git a/sourced/misc/cmd_stats.nu b/sourced/misc/cmd_stats.nu index 8968ed8..deecb43 100644 --- a/sourced/misc/cmd_stats.nu +++ b/sourced/misc/cmd_stats.nu @@ -1,10 +1,10 @@ -let builtin = ($nu.scope.commands | where is_builtin == true | length) -let subcmd = ($nu.scope.commands | where is_sub == true | length) -let plugin = ($nu.scope.commands | where is_plugin == true | length) -let custom = ($nu.scope.commands | where is_custom == true | length) -let keyword = ($nu.scope.commands | where is_keyword == true | length) -let extern = ($nu.scope.commands | where is_extern == true | length) -let total = ($nu.scope.commands | length) +let builtin = (scope commands | where is_builtin == true | length) +let subcmd = (scope commands | where is_sub == true | length) +let plugin = (scope commands | where is_plugin == true | length) +let custom = (scope commands | where is_custom == true | length) +let keyword = (scope commands | where is_keyword == true | length) +let extern = (scope commands | where is_extern == true | length) +let total = (scope commands | length) [ [command_type count]; @@ -15,4 +15,4 @@ let total = ($nu.scope.commands | length) [keyword $keyword] [extern $extern] [total_cmds $total] -] \ No newline at end of file +]