Files
dotfiles/dot_config/nushell/nu_scripts/custom-menus/fuzzy/modules.nu
Cian Hughes 896af887ca Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
2024-11-07 13:52:17 +00:00

25 lines
709 B
Nu

{
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):"
)
'
}
}