diff --git a/config/nushell/conf.d/alias.nu b/config/nushell/conf.d/alias.nu index 68f7e6d0..24f75560 100644 --- a/config/nushell/conf.d/alias.nu +++ b/config/nushell/conf.d/alias.nu @@ -1,2 +1,3 @@ alias ll = ls -al alias cd = z +alias t = ~/.config/tmux/start-tmux diff --git a/config/nushell/config.nu b/config/nushell/config.nu index dac42f8b..55cba2ec 100644 --- a/config/nushell/config.nu +++ b/config/nushell/config.nu @@ -384,7 +384,7 @@ let-env config = { case_sensitive: false # set to true to enable case-sensitive completions quick: true # set this to false to prevent auto-selecting completions when only one remains partial: true # set this to false to prevent partial filling of the prompt - algorithm: "prefix" # prefix or fuzzy + algorithm: "fuzzy" # prefix or fuzzy external: { enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options diff --git a/config/nushell/env.nu b/config/nushell/env.nu index 42a4d264..38f9e790 100644 --- a/config/nushell/env.nu +++ b/config/nushell/env.nu @@ -59,10 +59,12 @@ let-env NU_PLUGIN_DIRS = [ ($nu.config-path | path dirname | path join 'plugins') ] +load-env (fnm env --shell bash | lines | str replace 'export ' '' | str replace -a '"' '' | split column = | rename name value | where name != "FNM_ARCH" and name != "PATH" | reduce -f {} {|it, acc| $acc | upsert $it.name $it.value }) + # To add entries to PATH (on Windows you might use Path), you can use the following pattern: # let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path') # macOS ARM64 (Apple Silicon) let-env PATH = ($env.PATH | split row (char esep) | prepend '/opt/homebrew/bin') - +let-env PATH = ($env.PATH | prepend $"($env.FNM_MULTISHELL_PATH)/bin") # Linux # let-env PATH = ($env.PATH | split row (char esep) | prepend '/home/linuxbrew/.linuxbrew/bin')