mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00

`usage` column under the `scope commands` table has been renamed to description since nushell version 0.98.0
30 lines
752 B
Text
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 } }
|
|
}
|
|
}
|