2022-12-15 21:36:14 +01:00
|
|
|
# are we on windows or not?
|
2022-12-15 21:00:48 +01:00
|
|
|
def windows? [] {
|
|
|
|
$nu.os-info.name == windows
|
|
|
|
}
|
|
|
|
|
2022-12-15 21:36:14 +01:00
|
|
|
# filter out files that end in .d
|
2022-12-15 21:00:48 +01:00
|
|
|
def keep-plugin-executables [] {
|
2023-01-04 18:22:54 +01:00
|
|
|
if (windows?) { where name ends-with '.exe' } else { where name !~ '\.d' }
|
2022-12-15 21:00:48 +01:00
|
|
|
}
|
|
|
|
|
2022-08-24 02:38:02 +02:00
|
|
|
# get list of all plugin files from their installed directory
|
2023-03-02 02:25:42 +01:00
|
|
|
let plugins = (ls ((which nu).path.0 | path dirname) | where name =~ nu_plugin | keep-plugin-executables)
|
|
|
|
for plugin in $plugins {
|
2023-01-01 01:32:34 +01:00
|
|
|
print -n $"registering ($plugin.name), "
|
|
|
|
nu -c $"register '($plugin.name)'"
|
|
|
|
print "success!"
|
2022-08-24 02:38:02 +02:00
|
|
|
}
|
2023-03-02 02:25:42 +01:00
|
|
|
|
2022-09-07 18:54:28 +02:00
|
|
|
# print helpful message
|
2022-08-24 02:38:02 +02:00
|
|
|
print "\nplugins registered, please restart nushell"
|
2022-12-15 21:36:14 +01:00
|
|
|
|
|
|
|
# Plugin Location
|
|
|
|
# https://github.com/nushell/nushell/tree/main/crates/nu_plugin_custom_values
|
|
|
|
# https://github.com/nushell/nushell/tree/main/crates/nu_plugin_example
|
|
|
|
# https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gstat
|
|
|
|
# https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc
|
|
|
|
# https://github.com/nushell/nushell/tree/main/crates/nu_plugin_python
|
|
|
|
# https://github.com/nushell/nushell/tree/main/crates/nu_plugin_query
|
|
|
|
# https://github.com/fdncred/nu_plugin_from_parquet
|
|
|
|
# https://github.com/fdncred/nu_plugin_from_regex
|
|
|
|
# https://github.com/fdncred/nu_plugin_pnet
|
|
|
|
# https://github.com/JosephTLyons/nu_plugin_periodic_table
|
|
|
|
# https://github.com/Euphrasiologist/nu_plugin_bio
|
|
|
|
# https://github.com/realcundo/nu_plugin_dcm
|
|
|
|
# https://github.com/enerdgumen/nu_plugin_dotenv
|
|
|
|
# https://github.com/bluk/nu_plugin_from_bencode
|
|
|
|
|
|
|
|
# Older plugins
|
|
|
|
# https://github.com/notryanb/nu_plugin_id3
|
|
|
|
# https://github.com/notryanb/nu_plugin_weather
|
|
|
|
# https://github.com/tiffany352/nu-plugins/tree/main/from_nbt
|
|
|
|
# https://github.com/tiffany352/nu-plugins/tree/main/file_exists
|
|
|
|
# https://github.com/potan/nu_plugin_wifiscan
|
|
|
|
# https://github.com/autophagy/nu_plugin_from_dhall
|
|
|
|
# https://github.com/yanganto/nu_plugin_s3
|
|
|
|
# https://github.com/lukasreuter/nu_plugin_unity
|
|
|
|
# https://github.com/filaretov/nu_plugin_path_temp
|
|
|
|
# https://github.com/cdecompilador/nu_plugin_bg
|
|
|
|
# https://github.com/aJuvan/nu_plugin_kubectl
|
|
|
|
# https://github.com/hedonihilist/nu_plugin_df
|
|
|
|
|