1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-01 12:37:46 +00:00

Rename nushell variable

This commit is contained in:
RGBCube 2023-11-25 18:32:02 +03:00
parent e40b8a1885
commit 7acebbbac6
No known key found for this signature in database

View file

@ -140,12 +140,13 @@ $env.config.completions = {
$tokens $tokens
} }
let cmd = $tokens.0 | str trim --left --char "^" let command = $tokens.0 | str trim --left --char "^"
let completions = ^carapace $cmd nushell $tokens | from json | default [] let completions = carapace $command nushell $tokens | from json | default []
if ($completions | is-empty) { if ($completions | is-empty) {
let path = $tokens | last let path = $tokens | last
ls $"($path)*" | each {|it| ls $"($path)*" | each {|it|
let choice = if ($path | str ends-with "/") { let choice = if ($path | str ends-with "/") {
$path | path join ($it.name | path basename) $path | path join ($it.name | path basename)