1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-31 20:17:45 +00:00

Fix nushell completions

This commit is contained in:
RGBCube 2023-12-13 07:51:14 +03:00
parent 96a2cc3a5d
commit 53e0671a2c
No known key found for this signature in database

View file

@ -127,10 +127,10 @@ $env.config.completions = {
enable: true
max_results: 100
completer: {|tokens: list<string>|
let expanded_alias = scope aliases | where name == $tokens.0 | get --ignore-errors expansion.0
let expanded_alias = scope aliases | where name == $tokens.0 | get --ignore-errors expansion.0 | split row " "
let tokens = if $expanded_alias != null {
$expanded_alias | split row " " | append ($tokens | skip 1)
$tokens | skip 1 | prepend $expanded_alias.0
} else {
$tokens
}