mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
update regsiter-plugins script to not use encoding (#6512)
This commit is contained in:
parent
aa92141ad7
commit
773d167449
1 changed files with 9 additions and 11 deletions
|
@ -4,9 +4,9 @@ def match [input, matchers: record] {
|
|||
}
|
||||
|
||||
# register plugin
|
||||
def register_plugin [encoding, plugin] {
|
||||
def register_plugin [plugin] {
|
||||
print $"registering ($plugin)"
|
||||
nu -c $'register -e ($encoding) ($plugin)'
|
||||
nu -c $'register ($plugin)'
|
||||
}
|
||||
|
||||
# get list of all plugin files from their installed directory
|
||||
|
@ -15,16 +15,14 @@ let plugin_location = ((which nu).path.0 | path dirname)
|
|||
# for each plugin file, print the name and launch another instance of nushell to register it
|
||||
for plugin in (ls $"($plugin_location)/nu_plugin_*") {
|
||||
match ($plugin.name | path basename | str replace '\.exe$' '') {
|
||||
nu_plugin_custom_values: { register_plugin msgpack $plugin.name }
|
||||
nu_plugin_example: { register_plugin msgpack $plugin.name }
|
||||
nu_plugin_from_parquet: { register_plugin json $plugin.name }
|
||||
nu_plugin_gstat: { register_plugin msgpack $plugin.name }
|
||||
nu_plugin_inc: { register_plugin json $plugin.name }
|
||||
nu_plugin_query: { register_plugin json $plugin.name }
|
||||
nu_plugin_custom_values: { register_plugin $plugin.name }
|
||||
nu_plugin_example: { register_plugin $plugin.name }
|
||||
nu_plugin_from_parquet: { register_plugin $plugin.name }
|
||||
nu_plugin_gstat: { register_plugin $plugin.name }
|
||||
nu_plugin_inc: { register_plugin $plugin.name }
|
||||
nu_plugin_query: { register_plugin $plugin.name }
|
||||
}
|
||||
}
|
||||
|
||||
# print helpful message
|
||||
print "\nplugins registered, please restart nushell"
|
||||
|
||||
# print "\nplugin commands registered"
|
||||
# version | get installed_plugins | split row ', '
|
||||
|
|
Loading…
Reference in a new issue