[fix] Add fnm and do fuzzy completion
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
alias ll = ls -al
|
alias ll = ls -al
|
||||||
alias cd = z
|
alias cd = z
|
||||||
|
alias t = ~/.config/tmux/start-tmux
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ let-env config = {
|
|||||||
case_sensitive: false # set to true to enable case-sensitive completions
|
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
|
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
|
partial: true # set this to false to prevent partial filling of the prompt
|
||||||
algorithm: "prefix" # prefix or fuzzy
|
algorithm: "fuzzy" # prefix or fuzzy
|
||||||
external: {
|
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
|
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
|
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||||
|
|||||||
@@ -59,10 +59,12 @@ let-env NU_PLUGIN_DIRS = [
|
|||||||
($nu.config-path | path dirname | path join 'plugins')
|
($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:
|
# 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')
|
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
|
||||||
# macOS ARM64 (Apple Silicon)
|
# macOS ARM64 (Apple Silicon)
|
||||||
let-env PATH = ($env.PATH | split row (char esep) | prepend '/opt/homebrew/bin')
|
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
|
# Linux
|
||||||
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/home/linuxbrew/.linuxbrew/bin')
|
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/home/linuxbrew/.linuxbrew/bin')
|
||||||
|
|||||||
Reference in New Issue
Block a user