forked from extern/nushell
register-plugin.nu: remove .exe
extension match to simplify code (#6400)
Signed-off-by: nibon7 <nibon7@163.com> Signed-off-by: nibon7 <nibon7@163.com>
This commit is contained in:
parent
ab77bf3289
commit
a43514deb2
@ -9,21 +9,13 @@ 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_*") {
|
||||
print $"registering ($plugin.name)"
|
||||
match ($plugin.name | path basename) {
|
||||
# MacOS/Linux
|
||||
match ($plugin.name | path basename | str replace '\.exe$' '') {
|
||||
nu_plugin_custom_values: { nu -c $'register -e msgpack ($plugin.name)' }
|
||||
nu_plugin_example: { nu -c $'register -e msgpack ($plugin.name)' }
|
||||
nu_plugin_from_parquet: { nu -c $'register -e json ($plugin.name)' }
|
||||
nu_plugin_gstat: { nu -c $'register -e msgpack ($plugin.name)' }
|
||||
nu_plugin_inc: { nu -c $'register -e json ($plugin.name)' }
|
||||
nu_plugin_query: { nu -c $'register -e json ($plugin.name)' }
|
||||
# Windows
|
||||
nu_plugin_custom_values.exe: { nu -c $'register -e msgpack ($plugin.name)' }
|
||||
nu_plugin_example.exe: { nu -c $'register -e msgpack ($plugin.name)' }
|
||||
nu_plugin_from_parquet.exe: { nu -c $'register -e json ($plugin.name)' }
|
||||
nu_plugin_gstat.exe: { nu -c $'register -e msgpack ($plugin.name)' }
|
||||
nu_plugin_inc.exe: { nu -c $'register -e json ($plugin.name)' }
|
||||
nu_plugin_query.exe: { nu -c $'register -e json ($plugin.name)' }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user