mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Fix Nu scripts
This commit is contained in:
parent
89fb6b66fa
commit
9cc5d1f737
3 changed files with 686 additions and 453 deletions
|
@ -1,78 +1,31 @@
|
|||
let theme = {
|
||||
filesize: { |size|
|
||||
if $size == 0b {
|
||||
'white'
|
||||
} else if $size < 1mb {
|
||||
'cyan'
|
||||
} else {
|
||||
'blue'
|
||||
}
|
||||
}
|
||||
|
||||
date: { ||
|
||||
(date now) - $in |
|
||||
if $in < 1hr {
|
||||
'red3b'
|
||||
} else if $in < 6hr {
|
||||
'orange3'
|
||||
} else if $in < 1day {
|
||||
'yellow3b'
|
||||
} else if $in < 3day {
|
||||
'chartreuse2b'
|
||||
} else if $in < 1wk {
|
||||
'green3b'
|
||||
} else if $in < 6wk {
|
||||
'darkturquoise'
|
||||
} else if $in < 52wk {
|
||||
'deepskyblue3b'
|
||||
} else {
|
||||
'dark_gray'
|
||||
}
|
||||
}
|
||||
|
||||
bool: { ||
|
||||
if $in {
|
||||
'light_cyan'
|
||||
} else {
|
||||
'light_gray'
|
||||
}
|
||||
}
|
||||
|
||||
leading_trailing_space_bg: {
|
||||
attr: n
|
||||
}
|
||||
|
||||
empty: blue
|
||||
hints: dark_gray
|
||||
header: green_bold
|
||||
row_index: green_bold
|
||||
separator: white
|
||||
duration: white
|
||||
leading_trailing_space_bg: { attr: n }
|
||||
header: green_bold
|
||||
empty: blue
|
||||
bool: {|| if $in { light_cyan } else { light_red }}
|
||||
int: white
|
||||
filesize: cyan
|
||||
duration: white
|
||||
date: purple
|
||||
range: white
|
||||
float: white
|
||||
string: white
|
||||
nothing: white
|
||||
binary: white
|
||||
cellpath: white
|
||||
cell-path: white
|
||||
row_index: green_bold
|
||||
record: white
|
||||
list: white
|
||||
block: white
|
||||
|
||||
shape_garbage: {
|
||||
fg: "#FFFFFF"
|
||||
bg: "#FF0000"
|
||||
attr: b
|
||||
}
|
||||
|
||||
shape_matching_brackets: {
|
||||
attr: u
|
||||
}
|
||||
hints: dark_gray
|
||||
search_result: { bg: red fg: white }
|
||||
|
||||
shape_and: purple_bold
|
||||
shape_binary: purple_bold
|
||||
shape_block: blue_bold
|
||||
shape_bool: light_cyan
|
||||
shape_closure: green_bold
|
||||
shape_custom: green
|
||||
shape_datetime: cyan_bold
|
||||
shape_directory: cyan
|
||||
|
@ -81,12 +34,14 @@ let theme = {
|
|||
shape_filepath: cyan
|
||||
shape_flag: blue_bold
|
||||
shape_float: purple_bold
|
||||
shape_garbage: { fg: white bg: red attr: b}
|
||||
shape_globpattern: cyan_bold
|
||||
shape_int: purple_bold
|
||||
shape_internalcall: cyan_bold
|
||||
shape_list: cyan_bold
|
||||
shape_match_pattern: green
|
||||
shape_literal: blue
|
||||
shape_match_pattern: green
|
||||
shape_matching_brackets: { attr: u }
|
||||
shape_nothing: light_cyan
|
||||
shape_operator: yellow
|
||||
shape_or: purple_bold
|
||||
|
@ -99,10 +54,10 @@ let theme = {
|
|||
shape_string_interpolation: cyan_bold
|
||||
shape_table: blue_bold
|
||||
shape_variable: purple
|
||||
shape_vardecl: purple
|
||||
}
|
||||
|
||||
|
||||
let-env config = {
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
|
||||
ls: {
|
||||
|
@ -114,102 +69,127 @@ let-env config = {
|
|||
always_trash: false
|
||||
}
|
||||
|
||||
cd: {
|
||||
abbreviations: false
|
||||
}
|
||||
|
||||
table: {
|
||||
mode: rounded
|
||||
mode: basic
|
||||
index_mode: always
|
||||
show_empty: true
|
||||
|
||||
padding: { left: 1, right: 1 }
|
||||
trim: {
|
||||
methodology: wrapping
|
||||
wrapping_try_keep_words: true
|
||||
truncating_suffix: "..."
|
||||
}
|
||||
header_on_separator: false
|
||||
}
|
||||
|
||||
error_style: "fancy"
|
||||
|
||||
datetime_format: {}
|
||||
|
||||
explore: {
|
||||
help_banner: true
|
||||
exit_esc: true
|
||||
command_bar_text: '#C4C9C6'
|
||||
|
||||
status_bar_background: {
|
||||
fg: '#1D1F21'
|
||||
bg: '#C4C9C6'
|
||||
}
|
||||
|
||||
highlight: {
|
||||
bg: 'yellow'
|
||||
fg: 'black'
|
||||
}
|
||||
|
||||
status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" }
|
||||
command_bar_text: { fg: "#C4C9C6" }
|
||||
highlight: { fg: black, bg: yellow }
|
||||
status: {
|
||||
error: { fg: white, bg: red }
|
||||
warn: {}
|
||||
info: {}
|
||||
},
|
||||
table: {
|
||||
split_line: '#404040'
|
||||
cursor: true
|
||||
line_index: true
|
||||
line_shift: true
|
||||
line_head_top: true
|
||||
line_head_bottom: true
|
||||
show_head: true
|
||||
show_index: true
|
||||
}
|
||||
|
||||
config: {
|
||||
cursor_color: {
|
||||
bg: 'yellow'
|
||||
fg: 'black'
|
||||
}
|
||||
}
|
||||
split_line: { fg: "#404040" }
|
||||
selected_cell: { bg: light_blue }
|
||||
selected_row: {}
|
||||
selected_column: {}
|
||||
},
|
||||
}
|
||||
|
||||
history: {
|
||||
max_size: 1000
|
||||
max_size: 100_000
|
||||
sync_on_enter: true
|
||||
file_format: "plaintext"
|
||||
file_format: plaintext
|
||||
isolation: false
|
||||
}
|
||||
|
||||
completions: {
|
||||
case_sensitive: false
|
||||
quick: true
|
||||
partial: true
|
||||
algorithm: "prefix"
|
||||
|
||||
algorithm: prefix
|
||||
external: {
|
||||
enable: true
|
||||
max_results: 100
|
||||
completer: null
|
||||
completer: {|tokens|
|
||||
let expanded_alias = scope aliases | where name == $tokens.0 | get --ignore-errors expansion.0
|
||||
|
||||
let tokens = if $expanded_alias != null {
|
||||
$expanded_alias | split row " " | append ($tokens | skip 1)
|
||||
} else {
|
||||
$tokens
|
||||
}
|
||||
|
||||
let cmd = $tokens.0 | str trim --left --char "^"
|
||||
|
||||
let completions = ^carapace $cmd nushell $tokens | from json | default []
|
||||
|
||||
if ($completions | is-empty) {
|
||||
let path = $tokens | last
|
||||
ls $"($path)*" | each {|it|
|
||||
let choice = if ($path | str ends-with "/") {
|
||||
$path | path join ($it.name | path basename)
|
||||
} else {
|
||||
$path | path dirname | path join ($it.name | path basename)
|
||||
}
|
||||
|
||||
let choice = if ($it.type == "dir") and (not ($choice | str ends-with "/")) {
|
||||
$"($choice)/"
|
||||
} else {
|
||||
$choice
|
||||
}
|
||||
|
||||
if ($choice | str contains " ") {
|
||||
$"`($choice)`"
|
||||
} else {
|
||||
$choice
|
||||
}
|
||||
}
|
||||
} else if ($completions | where value =~ '^.*ERR$' | is-empty) {
|
||||
$completions
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
filesize: {
|
||||
metric: true
|
||||
format: "auto"
|
||||
format: auto
|
||||
}
|
||||
|
||||
cursor_shape: {
|
||||
vi_insert: line
|
||||
vi_normal: underscore
|
||||
emacs: line
|
||||
vi_insert: blink_underscore
|
||||
vi_normal: block
|
||||
}
|
||||
|
||||
color_config: $theme
|
||||
use_grid_icons: true
|
||||
footer_mode: "25"
|
||||
footer_mode: 25
|
||||
float_precision: 2
|
||||
buffer_editor: ""
|
||||
use_ansi_coloring: true
|
||||
bracketed_paste: true
|
||||
edit_mode: vi
|
||||
shell_integration: false
|
||||
render_right_prompt_on_last_line: true
|
||||
render_right_prompt_on_last_line: false
|
||||
use_kitty_protocol: false
|
||||
|
||||
hooks: {
|
||||
display_output: { ||
|
||||
if (term size).columns >= 100 {
|
||||
table -e
|
||||
} else {
|
||||
table
|
||||
}
|
||||
}
|
||||
pre_prompt: []
|
||||
pre_execution: []
|
||||
env_change: {}
|
||||
display_output: "if (term size).columns >= 100 { table -e } else { table }"
|
||||
command_not_found: {}
|
||||
}
|
||||
|
||||
menus: [
|
||||
|
@ -217,14 +197,12 @@ let-env config = {
|
|||
name: completion_menu
|
||||
only_buffer_difference: false
|
||||
marker: "| "
|
||||
|
||||
type: {
|
||||
layout: columnar
|
||||
columns: 4
|
||||
col_width: 20
|
||||
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||
col_padding: 2
|
||||
}
|
||||
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
|
@ -235,12 +213,10 @@ let-env config = {
|
|||
name: history_menu
|
||||
only_buffer_difference: true
|
||||
marker: "? "
|
||||
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
|
@ -251,104 +227,20 @@ let-env config = {
|
|||
name: help_menu
|
||||
only_buffer_difference: true
|
||||
marker: "? "
|
||||
|
||||
type: {
|
||||
layout: description
|
||||
columns: 4
|
||||
col_width: 20
|
||||
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
|
||||
col_padding: 2
|
||||
selection_rows: 4
|
||||
description_rows: 10
|
||||
}
|
||||
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
}
|
||||
{
|
||||
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|
|
||||
$nu.scope.commands
|
||||
| where name =~ $buffer
|
||||
| each { |it| {
|
||||
value: $it.name
|
||||
description: $it.usage
|
||||
} }
|
||||
}
|
||||
}
|
||||
{
|
||||
name: vars_menu
|
||||
only_buffer_difference: true
|
||||
marker: "# "
|
||||
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
|
||||
style: {
|
||||
text: green
|
||||
selected_text: green_reverse
|
||||
description_text: yellow
|
||||
}
|
||||
|
||||
source: { |buffer, position|
|
||||
nu.scope.vars
|
||||
| where name =~ $buffer
|
||||
| sort-by name
|
||||
| each { |it| {
|
||||
value: $it.name
|
||||
description: $it.type
|
||||
} }
|
||||
}
|
||||
}
|
||||
{
|
||||
name: commands_with_description
|
||||
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|
|
||||
$nu.scope.commands
|
||||
| where name =~ $buffer
|
||||
| each { |it| {
|
||||
value: $it.name
|
||||
description: $it.usage
|
||||
} }
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
keybindings: [
|
||||
|
@ -361,32 +253,40 @@ let-env config = {
|
|||
until: [
|
||||
{ send: menu name: completion_menu }
|
||||
{ send: menunext }
|
||||
{ edit: complete }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: completion_previous
|
||||
modifier: shift
|
||||
keycode: backtab
|
||||
mode: [vi_normal, vi_insert]
|
||||
event: { send: menuprevious }
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
modifier: control
|
||||
keycode: char_r
|
||||
mode: emacs
|
||||
mode: [emacs, vi_insert, vi_normal]
|
||||
event: { send: menu name: history_menu }
|
||||
}
|
||||
{
|
||||
name: next_page
|
||||
name: help_menu
|
||||
modifier: none
|
||||
keycode: f1
|
||||
mode: [emacs, vi_insert, vi_normal]
|
||||
event: { send: menu name: help_menu }
|
||||
}
|
||||
{
|
||||
name: completion_previous_menu
|
||||
modifier: shift
|
||||
keycode: backtab
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menuprevious }
|
||||
}
|
||||
{
|
||||
name: next_page_menu
|
||||
modifier: control
|
||||
keycode: char_x
|
||||
mode: emacs
|
||||
event: { send: menupagenext }
|
||||
}
|
||||
{
|
||||
name: undo_or_previous_page
|
||||
name: undo_or_previous_page_menu
|
||||
modifier: control
|
||||
keycode: char_z
|
||||
mode: emacs
|
||||
|
@ -398,58 +298,407 @@ let-env config = {
|
|||
}
|
||||
}
|
||||
{
|
||||
name: yank
|
||||
modifier: control
|
||||
keycode: char_y
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{ edit: pastecutbufferafter }
|
||||
]
|
||||
}
|
||||
name: escape
|
||||
modifier: none
|
||||
keycode: escape
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: esc } # NOTE: does not appear to work
|
||||
}
|
||||
{
|
||||
name: unix-line-discard
|
||||
name: cancel_command
|
||||
modifier: control
|
||||
keycode: char_u
|
||||
keycode: char_c
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: ctrlc }
|
||||
}
|
||||
{
|
||||
name: quit_shell
|
||||
modifier: control
|
||||
keycode: char_d
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: ctrld }
|
||||
}
|
||||
{
|
||||
name: clear_screen
|
||||
modifier: control
|
||||
keycode: char_l
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: clearscreen }
|
||||
}
|
||||
{
|
||||
name: search_history
|
||||
modifier: control
|
||||
keycode: char_q
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: searchhistory }
|
||||
}
|
||||
{
|
||||
name: open_command_editor
|
||||
modifier: control
|
||||
keycode: char_o
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: openeditor }
|
||||
}
|
||||
{
|
||||
name: move_up
|
||||
modifier: none
|
||||
keycode: up
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ edit: cutfromlinestart }
|
||||
{send: menuup}
|
||||
{send: up}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: kill-line
|
||||
modifier: control
|
||||
keycode: char_k
|
||||
name: move_down
|
||||
modifier: none
|
||||
keycode: down
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{ edit: cuttolineend }
|
||||
{send: menudown}
|
||||
{send: down}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: commands_menu
|
||||
name: move_left
|
||||
modifier: none
|
||||
keycode: left
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuleft}
|
||||
{send: left}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_right_or_take_history_hint
|
||||
modifier: none
|
||||
keycode: right
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{send: menuright}
|
||||
{send: right}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: control
|
||||
keycode: left
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: right
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: none
|
||||
keycode: home
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: control
|
||||
keycode: char_a
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end_or_take_history_hint
|
||||
modifier: none
|
||||
keycode: end
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{edit: movetolineend}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: char_e
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{edit: movetolineend}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: control
|
||||
keycode: home
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end
|
||||
modifier: control
|
||||
keycode: end
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {edit: movetolineend}
|
||||
}
|
||||
{
|
||||
name: move_up
|
||||
modifier: control
|
||||
keycode: char_p
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuup}
|
||||
{send: up}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: control
|
||||
keycode: char_t
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menu name: commands_menu }
|
||||
event: {
|
||||
until: [
|
||||
{send: menudown}
|
||||
{send: down}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: vars_menu
|
||||
modifier: alt
|
||||
keycode: char_o
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menu name: vars_menu }
|
||||
name: delete_one_character_backward
|
||||
modifier: none
|
||||
keycode: backspace
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspace}
|
||||
}
|
||||
{
|
||||
name: commands_with_description
|
||||
name: delete_one_word_backward
|
||||
modifier: control
|
||||
keycode: char_s
|
||||
mode: [emacs, vi_normal, vi_insert]
|
||||
event: { send: menu name: commands_with_description }
|
||||
keycode: backspace
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_forward
|
||||
modifier: none
|
||||
keycode: delete
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: delete}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_forward
|
||||
modifier: control
|
||||
keycode: delete
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: delete}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_forward
|
||||
modifier: control
|
||||
keycode: char_h
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspace}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: control
|
||||
keycode: char_w
|
||||
mode: [emacs, vi_insert]
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: none
|
||||
keycode: backspace
|
||||
mode: vi_normal
|
||||
event: {edit: moveleft}
|
||||
}
|
||||
{
|
||||
name: newline_or_run_command
|
||||
modifier: none
|
||||
keycode: enter
|
||||
mode: emacs
|
||||
event: {send: enter}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: control
|
||||
keycode: char_b
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: menuleft}
|
||||
{send: left}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_right_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: char_f
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{send: menuright}
|
||||
{send: right}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: redo_change
|
||||
modifier: control
|
||||
keycode: char_g
|
||||
mode: emacs
|
||||
event: {edit: redo}
|
||||
}
|
||||
{
|
||||
name: undo_change
|
||||
modifier: control
|
||||
keycode: char_z
|
||||
mode: emacs
|
||||
event: {edit: undo}
|
||||
}
|
||||
{
|
||||
name: paste_before
|
||||
modifier: control
|
||||
keycode: char_y
|
||||
mode: emacs
|
||||
event: {edit: pastecutbufferbefore}
|
||||
}
|
||||
{
|
||||
name: cut_word_left
|
||||
modifier: control
|
||||
keycode: char_w
|
||||
mode: emacs
|
||||
event: {edit: cutwordleft}
|
||||
}
|
||||
{
|
||||
name: cut_line_to_end
|
||||
modifier: control
|
||||
keycode: char_k
|
||||
mode: emacs
|
||||
event: {edit: cuttoend}
|
||||
}
|
||||
{
|
||||
name: cut_line_from_start
|
||||
modifier: control
|
||||
keycode: char_u
|
||||
mode: emacs
|
||||
event: {edit: cutfromstart}
|
||||
}
|
||||
{
|
||||
name: swap_graphemes
|
||||
modifier: control
|
||||
keycode: char_t
|
||||
mode: emacs
|
||||
event: {edit: swapgraphemes}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: alt
|
||||
keycode: left
|
||||
mode: emacs
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: alt
|
||||
keycode: right
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: alt
|
||||
keycode: char_b
|
||||
mode: emacs
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: alt
|
||||
keycode: char_f
|
||||
mode: emacs
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_forward
|
||||
modifier: alt
|
||||
keycode: delete
|
||||
mode: emacs
|
||||
event: {edit: deleteword}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: alt
|
||||
keycode: backspace
|
||||
mode: emacs
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: alt
|
||||
keycode: char_m
|
||||
mode: emacs
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: cut_word_to_right
|
||||
modifier: alt
|
||||
keycode: char_d
|
||||
mode: emacs
|
||||
event: {edit: cutwordright}
|
||||
}
|
||||
{
|
||||
name: upper_case_word
|
||||
modifier: alt
|
||||
keycode: char_u
|
||||
mode: emacs
|
||||
event: {edit: uppercaseword}
|
||||
}
|
||||
{
|
||||
name: lower_case_word
|
||||
modifier: alt
|
||||
keycode: char_l
|
||||
mode: emacs
|
||||
event: {edit: lowercaseword}
|
||||
}
|
||||
{
|
||||
name: capitalize_char
|
||||
modifier: alt
|
||||
keycode: char_c
|
||||
mode: emacs
|
||||
event: {edit: capitalizechar}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, pkgs, systemConfiguration, homeConfiguration, enabled, ... }: lib.recursiveUpdate
|
||||
{ lib, pkgs, systemConfiguration, homeConfiguration, homePackages, enabled, ... }: lib.recursiveUpdate3
|
||||
|
||||
(systemConfiguration {
|
||||
users.users.nixos.shell = pkgs.nushell;
|
||||
|
@ -17,3 +17,7 @@
|
|||
};
|
||||
};
|
||||
})
|
||||
|
||||
(with pkgs; homePackages "nixos" [
|
||||
carapace
|
||||
])
|
||||
|
|
|
@ -1,26 +1,6 @@
|
|||
let-env ENV_CONVERSIONS = {
|
||||
$env.ENV_CONVERSIONS = {
|
||||
"PATH": {
|
||||
from_string: { |string|
|
||||
$string
|
||||
| split row (char esep)
|
||||
| path expand -n
|
||||
}
|
||||
to_string: { |value|
|
||||
$value
|
||||
| path expand -n
|
||||
| str join (char esep)
|
||||
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$env.NU_LIB_DIRS = [
|
||||
($nu.config-path
|
||||
| path dirname
|
||||
| path join 'scripts')
|
||||
]
|
||||
|
||||
$env.NU_PLUGIN_DIRS = [
|
||||
($nu.config-path
|
||||
| path dirname
|
||||
| path join 'plugins')
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue