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

🐛 fix more parser errors (#783)

Hi! I reduced some of the errors in the daily CI. Still there are a few
of them, but at least is something

- Added the badge for the `daily.yml` (currently failing)
- removed old `docker` from v0.60
- removed old `git` from auto-generate completions
- removed `nethack` from auto-generate completions (wasn't very useful)
- removed `root` from auto-generate completions (wasn't very useful)
- removed `valgrind` from auto-generate completions (wasn't very useful)
- moved `less` from auto-generate to custom-completions.
- moved `mix` from auto-generate to custom-completions.
- moved `tar` from auto-generate to custom-completions.
- moved `tcpdump` from auto-generate to custom-completions.
- moved `virsh` from auto-generate to custom-completions.
- moved `zef` from auto-generate to custom-completions.
- fixed `base16.nu`
- fixed `from-cpuinfo.nu`
- fixed `from-dmicode.nu`
- fixed `to-number-format.nu`
- fixed `to-json-schema.nu`
This commit is contained in:
Auca Coyan 2024-03-15 23:10:27 -03:00 committed by GitHub
parent 878bfc615c
commit 13a73ab635
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 56 additions and 1617 deletions

View file

@ -142,7 +142,7 @@ export def from-file-table [base_txt: path] {
# Replace {{baseXX-hex}} with proper colors, such as #ffeedd
def apply-base16-mustache [template: string] {
reduce -f $template {
reduce -f $template { |it|
let subs = $"\{\{($it.item.name)-hex\}\}" # regex
let color = $it.item.color
$it.acc | str replace -a $subs $color

View file

@ -7,7 +7,7 @@ export def "from cpuinfo" [] {
| str trim
| update column1 {
get column1
| str replace -a -s ' ' '_'
| str replace -a ' ' '_'
}
| transpose -r -d
| update flags {

View file

@ -22,7 +22,7 @@ export def "from dmidecode" [] {
| split column ':'
| str trim
| str downcase column1
| str replace -a -s ' ' '_' column1
| str replace -a ' ' '_' column1
| transpose -r -d
}
} else {

View file

@ -16,7 +16,7 @@ export def number-format [
$parts.0
| split chars
| reverse
| reduce -n -f [] {
| reduce -f [] {
|it, acc| if ((($it.index + 1) mod 3) == 0) {
$acc.item
| append $it.item

View file

@ -1,6 +1,6 @@
# Converts specific JSON to JSON schema.
def to-json-schema [schema: int, url: string, json: string] {
if not $schema in [4, 7] {
if ($schema != 4 or $schema != 7) {
error make { msg: $"'http://json-schema.org/draft-0($schema)/schema' is not supported yet." }
}
if url == "" {