nushell dump

This commit is contained in:
Bloxx12 2025-07-15 21:31:31 +02:00
commit 655dfe3d48
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
6 changed files with 187 additions and 206 deletions

View file

@ -1,6 +1,6 @@
$env.config = {
bracketed_paste: true
buffer_editor: ""
buffer_editor: "hx"
datetime_format: {}
edit_mode: vi
error_style: fancy
@ -22,65 +22,6 @@ $env.config = {
}
}
$env.config.color_config = {
binary: white
block: white
bool: {|| if $in { "light_green" } else { "light_red" } }
cell-path: white
date: purple
duration: white
empty: blue
filesize: cyan
float: white
header: green_bold
hints: dark_gray
int: white
list: white
nothing: white
range: white
record: white
row_index: green_bold
search_result: { bg: red fg: white }
separator: white
string: {|| if $in =~ "^(#|0x)[a-fA-F0-9]+$" { ($in | str replace "0x" "#") } else { "white" } }
leading_trailing_space_bg: { attr: n }
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
shape_external: cyan
shape_externalarg: green_bold
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_literal: blue
shape_match_pattern: green
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_table: blue_bold
shape_vardecl: purple
shape_variable: purple
shape_matching_brackets: { attr: u }
shape_string_interpolation: cyan_bold
}
$env.config.ls = {
clickable_links: true
use_ls_colors: true
@ -125,46 +66,14 @@ $env.config.history = {
sync_on_enter: true
}
$env.config.completions = {
algorithm: prefix
case_sensitive: false
partial: true
quick: true
external: {
enable: true
max_results: 100
completer: {|tokens: list<string>|
let expanded = scope aliases | where name == $tokens.0 | get --ignore-errors expansion.0
mut expanded_tokens = if $expanded != null and $tokens.0 != "cd" {
$expanded | split row " " | append ($tokens | skip 1)
} else {
$tokens
}
$expanded_tokens.0 = ($expanded_tokens.0 | str trim --left --char "^")
fish --command $"complete '--do-complete=($expanded_tokens | str join ' ')'"
| $"value(char tab)description(char newline)" + $in
| from tsv --flexible --no-infer
}
}
}
$env.config.cursor_shape = {
vi_insert: block
vi_insert: line
vi_normal: block
}
$env.config.hooks = {
command_not_found: {||}
display_output: {
tee { table --expand | print }
| $env.last = $in
}
pre_execution: [
{
let prompt = commandline | str trim
@ -193,50 +102,15 @@ $env.config.hooks = {
]
}
# Retrieve the output of the last command.
def _ []: nothing -> any {
$env.last
}
$env.config.menus = [
{
marker: "| "
name: completion_menu
only_buffer_difference: false
style: {
description_text: yellow
selected_text: green_reverse
text: green
}
type: {
col_padding: 2
col_width: 20
columns: 4
layout: columnar
}
}
{
marker: "? "
name: history_menu
only_buffer_difference: true
style: {
description_text: yellow
selected_text: green_reverse
text: green
}
type: {
layout: list
page_size: 10
}
}
{
marker: "? "
marker: $"(ansi yellow)╋ "
name: help_menu
only_buffer_difference: true
style: {
description_text: yellow
selected_text: green_reverse
text: green
selected_text: red_reverse
text: yellow
}
type: {
col_padding: 2
@ -257,7 +131,7 @@ $env.config.keybindings = [
mode: [ vi_normal vi_insert ]
event: {
send: executehostcommand
cmd: 'commandline | nu-highlight | $"```ansi\n($in)\n```" | copy'
cmd: 'commandline | nu-highlight | $"```ansi\n($in)\n```" | wl-copy $in'
}
}
{
@ -273,13 +147,6 @@ $env.config.keybindings = [
]
}
}
{
name: history_menu
modifier: control
keycode: char_h
mode: [ vi_insert vi_normal ]
event: { send: menu name: history_menu }
}
{
name: escape
modifier: none
@ -434,29 +301,17 @@ $env.config.keybindings = [
}
]
source ~/.config/nushell/atuin.nu
source ./atuin.nu
source ./zoxide.nu
source ./source_profile.nu
source ./completions.nu
source ./prompt.nu
source ~/.config/nushell/zoxide.nu
# source ~/.config/nushell/source_profile.nu
# fix sudo by prepending /run/wrappers/bin to the PATH
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/run/wrappers/bin')
$env.STARSHIP_SHELL = "nu"
def create_left_prompt [] {
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
}
# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = { || create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = ""
# fix sudo by prepending /run/wrappers/bin to the PATH.
$env.PATH = ($env.PATH | split row (char esep) | prepend '/run/wrappers/bin')
$env.LS_COLORS = (vivid generate lava)
$env.EDITOR = "hx"
$env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense'
# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = ""
$env.PROMPT_INDICATOR_VI_INSERT = ": "
$env.PROMPT_INDICATOR_VI_NORMAL = "〉"
$env.PROMPT_MULTILINE_INDICATOR = "::: "
# the state of the prompt.