mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
24 lines
709 B
Text
24 lines
709 B
Text
{
|
|
name: fuzzy_module
|
|
modifier: control
|
|
keycode: char_u
|
|
mode: [emacs, vi_normal, vi_insert]
|
|
event: {
|
|
send: executehostcommand
|
|
cmd: '
|
|
commandline edit --replace "use "
|
|
commandline edit --insert (
|
|
$env.NU_LIB_DIRS
|
|
| each {|dir|
|
|
ls ($dir | path join "**" "*.nu")
|
|
| get name
|
|
| str replace $dir ""
|
|
| str trim -c "/"
|
|
}
|
|
| flatten
|
|
| input list --fuzzy
|
|
$"Please choose a (ansi magenta)module(ansi reset) to (ansi cyan_underline)load(ansi reset):"
|
|
)
|
|
'
|
|
}
|
|
}
|