mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-05 03:02:34 +01:00
nushell: enable fish as a completion source
This commit is contained in:
parent
e3819ca789
commit
b575bebe13
1 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
# See: https://www.nushell.sh/cookbook/external_completers.html#fish-completer
|
||||
let fish_completer = {|spans|
|
||||
fish --command $'complete "--do-complete=($spans | str join " ")"'
|
||||
| $"value(char tab)description(char newline)" + $in
|
||||
| from tsv --flexible --no-infer
|
||||
}
|
||||
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
|
||||
|
@ -8,7 +15,10 @@ $env.config = {
|
|||
}
|
||||
|
||||
completions: {
|
||||
algorithm: "fuzzy"
|
||||
external: (if (which fish | is-not-empty) { {
|
||||
enable: true
|
||||
completer: $fish_completer
|
||||
} } else { {} })
|
||||
}
|
||||
|
||||
cursor_shape: {
|
||||
|
|
Loading…
Reference in a new issue