mirror of
https://github.com/RGBCube/ncc
synced 2025-07-28 18:47:44 +00:00
nushell: add jc
This commit is contained in:
parent
b4919a5990
commit
a8cec1de3c
2 changed files with 22 additions and 0 deletions
|
@ -24,6 +24,27 @@ def --env mcg [path: path]: nothing -> nothing {
|
||||||
jj git init --colocate
|
jj git init --colocate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Run `jc` (JSON Converter).
|
||||||
|
def --wrapped jc [...arguments]: [any -> table, any -> record, any -> string] {
|
||||||
|
let run = ^jc ...$arguments | complete
|
||||||
|
|
||||||
|
if $run.exit_code != 0 {
|
||||||
|
error make {
|
||||||
|
msg: $run.stderr,
|
||||||
|
label: {
|
||||||
|
text: "jc execution failed",
|
||||||
|
span: (metadata $arguments).span
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if "--help" in $arguments or "-h" in $arguments {
|
||||||
|
$run.stdout
|
||||||
|
} else {
|
||||||
|
$run.stdout | from json
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# `nu-highlight` with default colors
|
# `nu-highlight` with default colors
|
||||||
#
|
#
|
||||||
# Custom themes can produce a lot more ansi color codes and make the output
|
# Custom themes can produce a lot more ansi color codes and make the output
|
||||||
|
|
|
@ -14,6 +14,7 @@ in {
|
||||||
fastfetch
|
fastfetch
|
||||||
fd
|
fd
|
||||||
hyperfine
|
hyperfine
|
||||||
|
jc
|
||||||
moreutils
|
moreutils
|
||||||
openssl
|
openssl
|
||||||
p7zip
|
p7zip
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue