Skip to content

Commit

Permalink
🐛 fix more parser errors (nushell#783)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
AucaCoyan authored Mar 16, 2024
1 parent 878bfc6 commit 13a73ab
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 1,617 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Nushell Scripts

![CI](https://github.com/nushell/nu_scripts/actions/workflows/daily.yml/badge.svg)


This is a place to share Nushell scripts with each other. If you'd like to share your scripts, fork this repository, and [create a PR](https://github.com/nushell/nu_scripts/compare) that adds it to the repo.

## Sections
Expand Down
16 changes: 0 additions & 16 deletions before_v0.60/docker/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions before_v0.60/docker/compose.nu

This file was deleted.

22 changes: 0 additions & 22 deletions before_v0.60/docker/docker.nu

This file was deleted.

1,450 changes: 0 additions & 1,450 deletions custom-completions/auto-generate/completions/git.nu

This file was deleted.

6 changes: 0 additions & 6 deletions custom-completions/auto-generate/completions/nethack.nu

This file was deleted.

5 changes: 0 additions & 5 deletions custom-completions/auto-generate/completions/root.nu

This file was deleted.

51 changes: 0 additions & 51 deletions custom-completions/auto-generate/completions/valgrind.nu

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Display help and exit
extern "less" [
--help(-\?) # Display help and exit
--help(-?) # Display help and exit
--search-skip-screen(-a) # Search after end of screen
--auto-buffers(-B) # Disable automtic buffer allocation
--clear-screen(-c) # Repaint from top
Expand Down Expand Up @@ -35,14 +35,16 @@ extern "less" [
--HILITE-UNREAD(-W) # Highlight first unread line on any movement
--no-init(-X) # No termcap init
--no-keypad # No keypad init
--tilde(-\~) # Lines after EOF are blank
--shift(-\#) # Characters to scroll on left/right arrows
--tilde(-~) # Lines after EOF are blank
--shift # Characters to scroll on left/right arrows
# this breaks the parser
# --shift(-#) # Characters to scroll on left/right arrows
...args
]

# Characters to scroll on left/right arrows
extern "less 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19" [
--help(-\?) # Display help and exit
--help(-?) # Display help and exit
--search-skip-screen(-a) # Search after end of screen
--auto-buffers(-B) # Disable automtic buffer allocation
--clear-screen(-c) # Repaint from top
Expand Down Expand Up @@ -77,7 +79,7 @@ extern "less 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19" [
--HILITE-UNREAD(-W) # Highlight first unread line on any movement
--no-init(-X) # No termcap init
--no-keypad # No keypad init
--tilde(-\~) # Lines after EOF are blank
--shift(-\#) # Characters to scroll on left/right arrows
--tilde(-~) # Lines after EOF are blank
# --shift(-#) # Characters to scroll on left/right arrows
...args
]
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,13 @@ extern "mix profile.fprof" [

# Runs the given file or expression
extern "mix run" [
--config(-c) # loads the given configuration file
--config(-c) # loads the given configuration file
--eval(-e) # evaluates the given code
--require(-r) # requires pattern before running the command
--parallel-require(-pr) # requires pattern in parallel
--no-compile # does not compile even if files require compilation
--no-deps-check # does not check dependencies
--require(-r) # requires pattern before running the command
--parallel-require # requires pattern in parallel
--pr # requires pattern in parallel
--no-compile # does not compile even if files require compilation
--no-deps-check # does not check dependencies
--no-halt # does not halt the system after running the command
--no-start # does not start applications after compilation
...args
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "tar" [
--list(-t) # List archive
--update(-u) # Append new files
--get(-x) # Extract from archive
--help(-\?) # Display short option summary
--help(-?) # Display short option summary
--usage # List available options
--atime-preserve # Keep access time
--block-size(-b) # Block size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ extern "tcpdump" [
--list-time-stamp-types(-J) # List the supported time stamp types for the interface
--dont-verify-checksums(-K) # Dont attempt to verify IP, TCP, or UDP checksums
--list-data-link-types(-L) # List the known data link types for the interface
--number(-\#) # Print an optional packet number
--number # Print an optional packet number
# breaks the parser
# --number(-\#) # Print an optional packet number
--no-optimize(-O) # Do not run the packet-matching code optimizer
--no-promiscuous-mode(-p) # Dont put the interface into promiscuous mode
--absolute-tcp-sequence-numbers(-S) # Print absolute TCP sequence numbers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ extern "virsh" [
...args
]

# Show version
extern "virsh short\tShort\ version long\tLong\ version" [

...args
]

# Attach device from an XML file
extern "virsh attach-device" [
--persistent # Make live change persistent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ extern "zef" [

# Install specific distributions by name or path
extern "zef install" [
# all the --/ commands break the parser
--fetch
--build
--/build # Skip the building phase
#--/build # Skip the building phase
--test
--/test # Skip the testing phase
#--/test # Skip the testing phase
--depends
--/depends # Do not fetch runtime dependencies
#--/depends # Do not fetch runtime dependencies
--build-depends
--/build-depends # Do not fetch build dependencies
#--/build-depends # Do not fetch build dependencies
--test-depends
--/test-depends # Do not fetch test dependencies
#--/test-depends # Do not fetch test dependencies
--force # Ignore errors
--force-resolve # Ignore errors
--force-fetch # Ignore errors
Expand All @@ -27,7 +28,7 @@ extern "zef install" [
--dry # Run all phases except the actual installations
--serial # Install each dependency after passing testing and before building/testing the next dependency
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
--exclude
--to # Short name or spec of CompUnit::Repository to install to
--install-to # Short name or spec of CompUnit::Repository to install to
Expand Down Expand Up @@ -58,7 +59,7 @@ extern "zef fetch" [
--force # Ignore errors
--force-fetch # Ignore errors
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
...args
]

Expand All @@ -79,15 +80,15 @@ extern "zef update" [
extern "zef upgrade" [
--fetch
--build
--/build # Skip the building phase
#--/build # Skip the building phase
--test
--/test # Skip the testing phase
#--/test # Skip the testing phase
--depends
--/depends # Do not fetch runtime dependencies
#--/depends # Do not fetch runtime dependencies
--build-depends
--/build-depends # Do not fetch build dependencies
#--/build-depends # Do not fetch build dependencies
--test-depends
--/test-depends # Do not fetch test dependencies
#--/test-depends # Do not fetch test dependencies
--force # Ignore errors
--force-resolve # Ignore errors
--force-fetch # Ignore errors
Expand All @@ -98,7 +99,7 @@ extern "zef upgrade" [
--dry # Run all phases except the actual installations
--serial # Install each dependency after passing testing and before building/testing the next dependency
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
--exclude
--to # Short name or spec of CompUnit::Repository to install to
--install-to # Short name or spec of CompUnit::Repository to install to
Expand All @@ -108,51 +109,51 @@ extern "zef upgrade" [
# Show a list of possible distribution candidates for the given terms
extern "zef search" [
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
...args
]

# Show detailed distribution information
extern "zef info" [
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
...args
]

# Browse support urls (bugtracker etc)
extern "zef browse" [
--open
--/open
#--/open
...args
]

# List available distributions
extern "zef list" [
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
--installed(-i)
...args
]

# List full dependencies for a given identity
extern "zef depends" [
--depends
--/depends # Do not fetch runtime dependencies
#--/depends # Do not fetch runtime dependencies
--build-depends
--/build-depends # Do not fetch build dependencies
#--/build-depends # Do not fetch build dependencies
--test-depends
--/test-depends # Do not fetch test dependencies
#--/test-depends # Do not fetch test dependencies
...args
]

# List all distributions directly depending on a given identity
extern "zef rdepends" [
--depends
--/depends # Do not fetch runtime dependencies
#--/depends # Do not fetch runtime dependencies
--build-depends
--/build-depends # Do not fetch build dependencies
#--/build-depends # Do not fetch build dependencies
--test-depends
--/test-depends # Do not fetch test dependencies
#--/test-depends # Do not fetch test dependencies
...args
]

Expand All @@ -167,15 +168,15 @@ extern "zef locate" [
extern "zef smoke" [
--fetch
--build
--/build # Skip the building phase
#--/build # Skip the building phase
--test
--/test # Skip the testing phase
#--/test # Skip the testing phase
--depends
--/depends # Do not fetch runtime dependencies
#--/depends # Do not fetch runtime dependencies
--build-depends
--/build-depends # Do not fetch build dependencies
#--/build-depends # Do not fetch build dependencies
--test-depends
--/test-depends # Do not fetch test dependencies
#--/test-depends # Do not fetch test dependencies
--force # Ignore errors
--force-resolve # Ignore errors
--force-fetch # Ignore errors
Expand All @@ -186,7 +187,7 @@ extern "zef smoke" [
--dry # Run all phases except the actual installations
--serial # Install each dependency after passing testing and before building/testing the next dependency
--update # Force a refresh for all module indexes or a specific ecosystem
--/update # Skip refreshing all module indexes or a specific ecosystem
#--/update # Skip refreshing all module indexes or a specific ecosystem
--exclude
--to # Short name or spec of CompUnit::Repository to install to
--install-to # Short name or spec of CompUnit::Repository to install to
Expand Down
2 changes: 1 addition & 1 deletion modules/base16/base16.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 13a73ab

Please sign in to comment.