style: correct keybinding name and improve formatting in default_config.nu (#11889)

<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
This PR addresses a minor mismatch in a keybinding name within the
`default_config.nu` file. Additionally, it applies formatting for
consistency.
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
This commit is contained in:
Filipe Paniguel 2024-02-18 23:50:50 -03:00 committed by GitHub
parent 68a3d7c430
commit c0bac5a440
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,7 @@ let dark_theme = {
list: white list: white
block: white block: white
hints: dark_gray hints: dark_gray
search_result: {bg: red fg: white} search_result: { bg: red fg: white }
shape_and: purple_bold shape_and: purple_bold
shape_binary: purple_bold shape_binary: purple_bold
shape_block: blue_bold shape_block: blue_bold
@ -96,7 +96,7 @@ let light_theme = {
list: dark_gray list: dark_gray
block: dark_gray block: dark_gray
hints: dark_gray hints: dark_gray
search_result: {fg: white bg: red} search_result: { fg: white bg: red }
shape_and: purple_bold shape_and: purple_bold
shape_binary: purple_bold shape_binary: purple_bold
shape_block: blue_bold shape_block: blue_bold
@ -179,17 +179,17 @@ $env.config = {
} }
explore: { explore: {
status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"}, status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" },
command_bar_text: {fg: "#C4C9C6"}, command_bar_text: { fg: "#C4C9C6" },
highlight: {fg: "black", bg: "yellow"}, highlight: { fg: "black", bg: "yellow" },
status: { status: {
error: {fg: "white", bg: "red"}, error: { fg: "white", bg: "red" },
warn: {} warn: {}
info: {} info: {}
}, },
table: { table: {
split_line: {fg: "#404040"}, split_line: { fg: "#404040" },
selected_cell: {bg: light_blue}, selected_cell: { bg: light_blue },
selected_row: {}, selected_row: {},
selected_column: {}, selected_column: {},
}, },
@ -266,10 +266,10 @@ $env.config = {
} }
style: { style: {
text: green text: green
selected_text: {attr: r} selected_text: { attr: r }
description_text: yellow description_text: yellow
match_text: {attr: u} match_text: { attr: u }
selected_match_text: {attr: ur} selected_match_text: { attr: ur }
} }
} }
{ {
@ -299,10 +299,10 @@ $env.config = {
} }
style: { style: {
text: green text: green
selected_text: {attr: r} selected_text: { attr: r }
description_text: yellow description_text: yellow
match_text: {attr: u} match_text: { attr: u }
selected_match_text: {attr: ur} selected_match_text: { attr: ur }
} }
} }
{ {
@ -455,8 +455,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: menuup} { send: menuup }
{send: up} { send: up }
] ]
} }
} }
@ -467,8 +467,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: menudown} { send: menudown }
{send: down} { send: down }
] ]
} }
} }
@ -479,8 +479,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: menuleft} { send: menuleft }
{send: left} { send: left }
] ]
} }
} }
@ -491,9 +491,9 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: historyhintcomplete} { send: historyhintcomplete }
{send: menuright} { send: menuright }
{send: right} { send: right }
] ]
} }
} }
@ -502,7 +502,7 @@ $env.config = {
modifier: control modifier: control
keycode: left keycode: left
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: {edit: movewordleft} event: { edit: movewordleft }
} }
{ {
name: move_one_word_right_or_take_history_hint name: move_one_word_right_or_take_history_hint
@ -511,8 +511,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: historyhintwordcomplete} { send: historyhintwordcomplete }
{edit: movewordright} { edit: movewordright }
] ]
} }
} }
@ -521,14 +521,14 @@ $env.config = {
modifier: none modifier: none
keycode: home keycode: home
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart} event: { edit: movetolinestart }
} }
{ {
name: move_to_line_start name: move_to_line_start
modifier: control modifier: control
keycode: char_a keycode: char_a
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart} event: { edit: movetolinestart }
} }
{ {
name: move_to_line_end_or_take_history_hint name: move_to_line_end_or_take_history_hint
@ -537,8 +537,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: historyhintcomplete} { send: historyhintcomplete }
{edit: movetolineend} { edit: movetolineend }
] ]
} }
} }
@ -549,8 +549,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: historyhintcomplete} { send: historyhintcomplete }
{edit: movetolineend} { edit: movetolineend }
] ]
} }
} }
@ -559,14 +559,14 @@ $env.config = {
modifier: control modifier: control
keycode: home keycode: home
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart} event: { edit: movetolinestart }
} }
{ {
name: move_to_line_end name: move_to_line_end
modifier: control modifier: control
keycode: end keycode: end
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolineend} event: { edit: movetolineend }
} }
{ {
name: move_up name: move_up
@ -575,8 +575,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: menuup} { send: menuup }
{send: up} { send: up }
] ]
} }
} }
@ -587,8 +587,8 @@ $env.config = {
mode: [emacs, vi_normal, vi_insert] mode: [emacs, vi_normal, vi_insert]
event: { event: {
until: [ until: [
{send: menudown} { send: menudown }
{send: down} { send: down }
] ]
} }
} }
@ -597,56 +597,56 @@ $env.config = {
modifier: none modifier: none
keycode: backspace keycode: backspace
mode: [emacs, vi_insert] mode: [emacs, vi_insert]
event: {edit: backspace} event: { edit: backspace }
} }
{ {
name: delete_one_word_backward name: delete_one_word_backward
modifier: control modifier: control
keycode: backspace keycode: backspace
mode: [emacs, vi_insert] mode: [emacs, vi_insert]
event: {edit: backspaceword} event: { edit: backspaceword }
} }
{ {
name: delete_one_character_forward name: delete_one_character_forward
modifier: none modifier: none
keycode: delete keycode: delete
mode: [emacs, vi_insert] mode: [emacs, vi_insert]
event: {edit: delete} event: { edit: delete }
} }
{ {
name: delete_one_character_forward name: delete_one_character_forward
modifier: control modifier: control
keycode: delete keycode: delete
mode: [emacs, vi_insert] mode: [emacs, vi_insert]
event: {edit: delete} event: { edit: delete }
} }
{ {
name: delete_one_character_forward name: delete_one_character_backward
modifier: control modifier: control
keycode: char_h keycode: char_h
mode: [emacs, vi_insert] mode: [emacs, vi_insert]
event: {edit: backspace} event: { edit: backspace }
} }
{ {
name: delete_one_word_backward name: delete_one_word_backward
modifier: control modifier: control
keycode: char_w keycode: char_w
mode: [emacs, vi_insert] mode: [emacs, vi_insert]
event: {edit: backspaceword} event: { edit: backspaceword }
} }
{ {
name: move_left name: move_left
modifier: none modifier: none
keycode: backspace keycode: backspace
mode: vi_normal mode: vi_normal
event: {edit: moveleft} event: { edit: moveleft }
} }
{ {
name: newline_or_run_command name: newline_or_run_command
modifier: none modifier: none
keycode: enter keycode: enter
mode: emacs mode: emacs
event: {send: enter} event: { send: enter }
} }
{ {
name: move_left name: move_left
@ -655,8 +655,8 @@ $env.config = {
mode: emacs mode: emacs
event: { event: {
until: [ until: [
{send: menuleft} { send: menuleft }
{send: left} { send: left }
] ]
} }
} }
@ -667,9 +667,9 @@ $env.config = {
mode: emacs mode: emacs
event: { event: {
until: [ until: [
{send: historyhintcomplete} { send: historyhintcomplete }
{send: menuright} { send: menuright }
{send: right} { send: right }
] ]
} }
} }
@ -678,56 +678,56 @@ $env.config = {
modifier: control modifier: control
keycode: char_g keycode: char_g
mode: emacs mode: emacs
event: {edit: redo} event: { edit: redo }
} }
{ {
name: undo_change name: undo_change
modifier: control modifier: control
keycode: char_z keycode: char_z
mode: emacs mode: emacs
event: {edit: undo} event: { edit: undo }
} }
{ {
name: paste_before name: paste_before
modifier: control modifier: control
keycode: char_y keycode: char_y
mode: emacs mode: emacs
event: {edit: pastecutbufferbefore} event: { edit: pastecutbufferbefore }
} }
{ {
name: cut_word_left name: cut_word_left
modifier: control modifier: control
keycode: char_w keycode: char_w
mode: emacs mode: emacs
event: {edit: cutwordleft} event: { edit: cutwordleft }
} }
{ {
name: cut_line_to_end name: cut_line_to_end
modifier: control modifier: control
keycode: char_k keycode: char_k
mode: emacs mode: emacs
event: {edit: cuttoend} event: { edit: cuttoend }
} }
{ {
name: cut_line_from_start name: cut_line_from_start
modifier: control modifier: control
keycode: char_u keycode: char_u
mode: emacs mode: emacs
event: {edit: cutfromstart} event: { edit: cutfromstart }
} }
{ {
name: swap_graphemes name: swap_graphemes
modifier: control modifier: control
keycode: char_t keycode: char_t
mode: emacs mode: emacs
event: {edit: swapgraphemes} event: { edit: swapgraphemes }
} }
{ {
name: move_one_word_left name: move_one_word_left
modifier: alt modifier: alt
keycode: left keycode: left
mode: emacs mode: emacs
event: {edit: movewordleft} event: { edit: movewordleft }
} }
{ {
name: move_one_word_right_or_take_history_hint name: move_one_word_right_or_take_history_hint
@ -736,8 +736,8 @@ $env.config = {
mode: emacs mode: emacs
event: { event: {
until: [ until: [
{send: historyhintwordcomplete} { send: historyhintwordcomplete }
{edit: movewordright} { edit: movewordright }
] ]
} }
} }
@ -746,7 +746,7 @@ $env.config = {
modifier: alt modifier: alt
keycode: char_b keycode: char_b
mode: emacs mode: emacs
event: {edit: movewordleft} event: { edit: movewordleft }
} }
{ {
name: move_one_word_right_or_take_history_hint name: move_one_word_right_or_take_history_hint
@ -755,8 +755,8 @@ $env.config = {
mode: emacs mode: emacs
event: { event: {
until: [ until: [
{send: historyhintwordcomplete} { send: historyhintwordcomplete }
{edit: movewordright} { edit: movewordright }
] ]
} }
} }
@ -765,49 +765,49 @@ $env.config = {
modifier: alt modifier: alt
keycode: delete keycode: delete
mode: emacs mode: emacs
event: {edit: deleteword} event: { edit: deleteword }
} }
{ {
name: delete_one_word_backward name: delete_one_word_backward
modifier: alt modifier: alt
keycode: backspace keycode: backspace
mode: emacs mode: emacs
event: {edit: backspaceword} event: { edit: backspaceword }
} }
{ {
name: delete_one_word_backward name: delete_one_word_backward
modifier: alt modifier: alt
keycode: char_m keycode: char_m
mode: emacs mode: emacs
event: {edit: backspaceword} event: { edit: backspaceword }
} }
{ {
name: cut_word_to_right name: cut_word_to_right
modifier: alt modifier: alt
keycode: char_d keycode: char_d
mode: emacs mode: emacs
event: {edit: cutwordright} event: { edit: cutwordright }
} }
{ {
name: upper_case_word name: upper_case_word
modifier: alt modifier: alt
keycode: char_u keycode: char_u
mode: emacs mode: emacs
event: {edit: uppercaseword} event: { edit: uppercaseword }
} }
{ {
name: lower_case_word name: lower_case_word
modifier: alt modifier: alt
keycode: char_l keycode: char_l
mode: emacs mode: emacs
event: {edit: lowercaseword} event: { edit: lowercaseword }
} }
{ {
name: capitalize_char name: capitalize_char
modifier: alt modifier: alt
keycode: char_c keycode: char_c
mode: emacs mode: emacs
event: {edit: capitalizechar} event: { edit: capitalizechar }
} }
{ {
name: copy_selection name: copy_selection