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
32 lines
854 B
Text
32 lines
854 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_with_description_menu
|
|
# modifier: control
|
|
# keycode: char_s
|
|
# mode: [emacs, vi_normal, vi_insert]
|
|
# event: { send: menu name: commands_with_description }
|
|
# }
|
|
|
|
{
|
|
name: commands_with_description_menu
|
|
only_buffer_difference: true
|
|
marker: "# "
|
|
type: {
|
|
layout: description
|
|
columns: 4
|
|
col_width: 20
|
|
col_padding: 2
|
|
selection_rows: 4
|
|
description_rows: 10
|
|
}
|
|
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} }
|
|
}
|
|
}
|