1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00
nu_scripts/custom-menus/extra/commands.nu
ff2400t b5385a2af0
in commands table rename usage to description (#990)
`usage` column under the `scope commands` table has been renamed to
description since nushell version 0.98.0
2024-12-08 07:27:33 -06:00

30 lines
752 B
Text

# can be used in the REPL by adding something like the following block to `$env.config.keybindings` in your `config.nu`
# {
# name: commands_menu
# modifier: control
# keycode: char_t
# mode: [emacs, vi_normal, vi_insert]
# event: { send: menu name: commands_menu }
# }
{
name: commands_menu
only_buffer_difference: false
marker: "# "
type: {
layout: columnar
columns: 4
col_width: 20
col_padding: 2
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
source: { |buffer, position|
scope commands
| where name =~ $buffer
| each { |it| {value: $it.name description: $it.description } }
}
}