mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Use for
instead of each
in register-plugins.nu (#8284)
Tiny change, just avoids printing `empty list` when running `register-plugins.nu`. Context: https://github.com/nushell/nushell/pull/8014#issuecomment-1440733867
This commit is contained in:
parent
1a62d87a42
commit
12483fac92
1 changed files with 3 additions and 4 deletions
|
@ -9,14 +9,13 @@ def keep-plugin-executables [] {
|
||||||
}
|
}
|
||||||
|
|
||||||
# get list of all plugin files from their installed directory
|
# get list of all plugin files from their installed directory
|
||||||
ls ((which nu).path.0 | path dirname)
|
let plugins = (ls ((which nu).path.0 | path dirname) | where name =~ nu_plugin | keep-plugin-executables)
|
||||||
| where name =~ nu_plugin
|
for plugin in $plugins {
|
||||||
| keep-plugin-executables
|
|
||||||
| each {|plugin|
|
|
||||||
print -n $"registering ($plugin.name), "
|
print -n $"registering ($plugin.name), "
|
||||||
nu -c $"register '($plugin.name)'"
|
nu -c $"register '($plugin.name)'"
|
||||||
print "success!"
|
print "success!"
|
||||||
}
|
}
|
||||||
|
|
||||||
# print helpful message
|
# print helpful message
|
||||||
print "\nplugins registered, please restart nushell"
|
print "\nplugins registered, please restart nushell"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue