add windows config for nu
This commit is contained in:
parent
35eeb64e85
commit
9d4996097b
4 changed files with 65 additions and 39 deletions
|
@ -236,34 +236,36 @@ $env.config = {
|
||||||
use_ansi_coloring: true
|
use_ansi_coloring: true
|
||||||
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
||||||
edit_mode: emacs # emacs, vi
|
edit_mode: emacs # emacs, vi
|
||||||
shell_integration: {
|
shell_integration: true
|
||||||
# osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title
|
# {
|
||||||
osc2: true
|
# # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title
|
||||||
# osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory
|
# osc2: true
|
||||||
osc7: true
|
# # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory
|
||||||
# osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8
|
# osc7: true
|
||||||
osc8: true
|
# # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8
|
||||||
# osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal
|
# osc8: true
|
||||||
osc9_9: false
|
# # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal
|
||||||
# osc133 is several escapes invented by Final Term which include the supported ones below.
|
# osc9_9: false
|
||||||
# 133;A - Mark prompt start
|
# # osc133 is several escapes invented by Final Term which include the supported ones below.
|
||||||
# 133;B - Mark prompt end
|
# # 133;A - Mark prompt start
|
||||||
# 133;C - Mark pre-execution
|
# # 133;B - Mark prompt end
|
||||||
# 133;D;exit - Mark execution finished with exit code
|
# # 133;C - Mark pre-execution
|
||||||
# This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is
|
# # 133;D;exit - Mark execution finished with exit code
|
||||||
osc133: true
|
# # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is
|
||||||
# osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features
|
# osc133: true
|
||||||
# 633;A - Mark prompt start
|
# # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features
|
||||||
# 633;B - Mark prompt end
|
# # 633;A - Mark prompt start
|
||||||
# 633;C - Mark pre-execution
|
# # 633;B - Mark prompt end
|
||||||
# 633;D;exit - Mark execution finished with exit code
|
# # 633;C - Mark pre-execution
|
||||||
# 633;E - NOT IMPLEMENTED - Explicitly set the command line with an optional nonce
|
# # 633;D;exit - Mark execution finished with exit code
|
||||||
# 633;P;Cwd=<path> - Mark the current working directory and communicate it to the terminal
|
# # 633;E - NOT IMPLEMENTED - Explicitly set the command line with an optional nonce
|
||||||
# and also helps with the run recent menu in vscode
|
# # 633;P;Cwd=<path> - Mark the current working directory and communicate it to the terminal
|
||||||
osc633: true
|
# # and also helps with the run recent menu in vscode
|
||||||
# reset_application_mode is escape \x1b[?1l and was added to help ssh work better
|
# osc633: true
|
||||||
reset_application_mode: true
|
# # reset_application_mode is escape \x1b[?1l and was added to help ssh work better
|
||||||
}
|
# reset_application_mode: true
|
||||||
|
# }
|
||||||
|
|
||||||
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||||
use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
|
use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
|
||||||
highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
|
highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
|
||||||
|
@ -893,3 +895,23 @@ $env.config = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use ~/.cache/starship/init.nu
|
||||||
|
source ~/.zoxide.nu
|
||||||
|
|
||||||
|
alias ga = git add
|
||||||
|
alias gaa = git add --all
|
||||||
|
alias gc = git commit
|
||||||
|
alias gcam = git commit -a -m
|
||||||
|
alias gco = git checkout
|
||||||
|
alias gd = git diff
|
||||||
|
alias gl = git pull
|
||||||
|
alias glg = git lg
|
||||||
|
alias gp = git push
|
||||||
|
alias grb = git rebase
|
||||||
|
alias grba = git rebase --abort
|
||||||
|
alias grbc = git rebase --continue
|
||||||
|
alias grm = git rm
|
||||||
|
alias grmc = git rm --cached
|
||||||
|
alias gsh = git show
|
||||||
|
alias gst = git status
|
|
@ -2,6 +2,8 @@
|
||||||
#
|
#
|
||||||
# version = "0.91.0"
|
# version = "0.91.0"
|
||||||
|
|
||||||
|
use std "path add"
|
||||||
|
|
||||||
def create_left_prompt [] {
|
def create_left_prompt [] {
|
||||||
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
|
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
|
||||||
null => $env.PWD
|
null => $env.PWD
|
||||||
|
@ -100,16 +102,16 @@ $env.NU_PLUGIN_DIRS = [
|
||||||
# source ($nu.default-config-dir | path join 'custom.nu')
|
# source ($nu.default-config-dir | path join 'custom.nu')
|
||||||
|
|
||||||
$env.ANDROID_HOME = '/Users/michael/Library/Android/sdk'
|
$env.ANDROID_HOME = '/Users/michael/Library/Android/sdk'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '/opt/homebrew/bin')
|
path add '/opt/homebrew/bin'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '/usr/local/bin')
|
path add '/usr/local/bin'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '~/go/bin')
|
path add '~/go/bin'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '~/opt/flutter/bin')
|
path add '~/opt/flutter/bin'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '~/.nix-profile/bin')
|
path add '~/.nix-profile/bin'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend '/nix/var/nix/profiles/default/bin')
|
path add '/nix/var/nix/profiles/default/bin'
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend `~/.cargo/bin`)
|
path add `~/.cargo/bin`
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend `~/Library/Application Support/fnm/aliases/default/bin/`)
|
path add `~/Library/Application Support/fnm/aliases/default/bin/`
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend `~/.bun/bin`)
|
path add `~/.bun/bin`
|
||||||
$env.PATH = ($env.PATH | split row (char esep) | prepend `~/.ghcup/bin`)
|
path add `~/.ghcup/bin`
|
||||||
|
|
||||||
mkdir ~/.cache/starship
|
mkdir ~/.cache/starship
|
||||||
starship init nu | save -f ~/.cache/starship/init.nu
|
starship init nu | save -f ~/.cache/starship/init.nu
|
||||||
|
|
1
AppData/Roaming/nushell/config.nu.tmpl
Normal file
1
AppData/Roaming/nushell/config.nu.tmpl
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- template "nu-config.nu" . -}}
|
1
AppData/Roaming/nushell/env.nu.tmpl
Normal file
1
AppData/Roaming/nushell/env.nu.tmpl
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{- template "nu-env.nu" . -}}
|
Loading…
Reference in a new issue