Skip to content

Commit 13a73ab

Browse files
authored
🐛 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`
1 parent 878bfc6 commit 13a73ab

File tree

19 files changed

+56
-1617
lines changed

19 files changed

+56
-1617
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Nushell Scripts
22

3+
![CI](https://github.com/nushell/nu_scripts/actions/workflows/daily.yml/badge.svg)
4+
5+
36
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.
47

58
## Sections

before_v0.60/docker/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

before_v0.60/docker/compose.nu

Lines changed: 0 additions & 14 deletions
This file was deleted.

before_v0.60/docker/docker.nu

Lines changed: 0 additions & 22 deletions
This file was deleted.

custom-completions/auto-generate/completions/git.nu

Lines changed: 0 additions & 1450 deletions
This file was deleted.

custom-completions/auto-generate/completions/nethack.nu

Lines changed: 0 additions & 6 deletions
This file was deleted.

custom-completions/auto-generate/completions/root.nu

Lines changed: 0 additions & 5 deletions
This file was deleted.

custom-completions/auto-generate/completions/valgrind.nu

Lines changed: 0 additions & 51 deletions
This file was deleted.

custom-completions/auto-generate/completions/less.nu renamed to custom-completions/less/less-completions.nu

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Display help and exit
22
extern "less" [
3-
--help(-\?) # Display help and exit
3+
--help(-?) # Display help and exit
44
--search-skip-screen(-a) # Search after end of screen
55
--auto-buffers(-B) # Disable automtic buffer allocation
66
--clear-screen(-c) # Repaint from top
@@ -35,14 +35,16 @@ extern "less" [
3535
--HILITE-UNREAD(-W) # Highlight first unread line on any movement
3636
--no-init(-X) # No termcap init
3737
--no-keypad # No keypad init
38-
--tilde(-\~) # Lines after EOF are blank
39-
--shift(-\#) # Characters to scroll on left/right arrows
38+
--tilde(-~) # Lines after EOF are blank
39+
--shift # Characters to scroll on left/right arrows
40+
# this breaks the parser
41+
# --shift(-#) # Characters to scroll on left/right arrows
4042
...args
4143
]
4244

4345
# Characters to scroll on left/right arrows
4446
extern "less 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19" [
45-
--help(-\?) # Display help and exit
47+
--help(-?) # Display help and exit
4648
--search-skip-screen(-a) # Search after end of screen
4749
--auto-buffers(-B) # Disable automtic buffer allocation
4850
--clear-screen(-c) # Repaint from top
@@ -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" [
7779
--HILITE-UNREAD(-W) # Highlight first unread line on any movement
7880
--no-init(-X) # No termcap init
7981
--no-keypad # No keypad init
80-
--tilde(-\~) # Lines after EOF are blank
81-
--shift(-\#) # Characters to scroll on left/right arrows
82+
--tilde(-~) # Lines after EOF are blank
83+
# --shift(-#) # Characters to scroll on left/right arrows
8284
...args
8385
]

custom-completions/auto-generate/completions/mix.nu renamed to custom-completions/mix/mix-completions.nu

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,13 @@ extern "mix profile.fprof" [
148148

149149
# Runs the given file or expression
150150
extern "mix run" [
151-
--config(-c) # loads the given configuration file
151+
--config(-c) # loads the given configuration file
152152
--eval(-e) # evaluates the given code
153-
--require(-r) # requires pattern before running the command
154-
--parallel-require(-pr) # requires pattern in parallel
155-
--no-compile # does not compile even if files require compilation
156-
--no-deps-check # does not check dependencies
153+
--require(-r) # requires pattern before running the command
154+
--parallel-require # requires pattern in parallel
155+
--pr # requires pattern in parallel
156+
--no-compile # does not compile even if files require compilation
157+
--no-deps-check # does not check dependencies
157158
--no-halt # does not halt the system after running the command
158159
--no-start # does not start applications after compilation
159160
...args

custom-completions/auto-generate/completions/tar.nu renamed to custom-completions/tar/tar-completions.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern "tar" [
88
--list(-t) # List archive
99
--update(-u) # Append new files
1010
--get(-x) # Extract from archive
11-
--help(-\?) # Display short option summary
11+
--help(-?) # Display short option summary
1212
--usage # List available options
1313
--atime-preserve # Keep access time
1414
--block-size(-b) # Block size

custom-completions/auto-generate/completions/tcpdump.nu renamed to custom-completions/tcpdump/tcpdump-completions.nu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ extern "tcpdump" [
88
--list-time-stamp-types(-J) # List the supported time stamp types for the interface
99
--dont-verify-checksums(-K) # Dont attempt to verify IP, TCP, or UDP checksums
1010
--list-data-link-types(-L) # List the known data link types for the interface
11-
--number(-\#) # Print an optional packet number
11+
--number # Print an optional packet number
12+
# breaks the parser
13+
# --number(-\#) # Print an optional packet number
1214
--no-optimize(-O) # Do not run the packet-matching code optimizer
1315
--no-promiscuous-mode(-p) # Dont put the interface into promiscuous mode
1416
--absolute-tcp-sequence-numbers(-S) # Print absolute TCP sequence numbers

custom-completions/auto-generate/completions/virsh.nu renamed to custom-completions/virsh/virsh-completions.nu

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ extern "virsh" [
44
...args
55
]
66

7-
# Show version
8-
extern "virsh short\tShort\ version long\tLong\ version" [
9-
10-
...args
11-
]
12-
137
# Attach device from an XML file
148
extern "virsh attach-device" [
159
--persistent # Make live change persistent

custom-completions/auto-generate/completions/zef.nu renamed to custom-completions/zef/zef-completions.nu

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ extern "zef" [
66

77
# Install specific distributions by name or path
88
extern "zef install" [
9+
# all the --/ commands break the parser
910
--fetch
1011
--build
11-
--/build # Skip the building phase
12+
#--/build # Skip the building phase
1213
--test
13-
--/test # Skip the testing phase
14+
#--/test # Skip the testing phase
1415
--depends
15-
--/depends # Do not fetch runtime dependencies
16+
#--/depends # Do not fetch runtime dependencies
1617
--build-depends
17-
--/build-depends # Do not fetch build dependencies
18+
#--/build-depends # Do not fetch build dependencies
1819
--test-depends
19-
--/test-depends # Do not fetch test dependencies
20+
#--/test-depends # Do not fetch test dependencies
2021
--force # Ignore errors
2122
--force-resolve # Ignore errors
2223
--force-fetch # Ignore errors
@@ -27,7 +28,7 @@ extern "zef install" [
2728
--dry # Run all phases except the actual installations
2829
--serial # Install each dependency after passing testing and before building/testing the next dependency
2930
--update # Force a refresh for all module indexes or a specific ecosystem
30-
--/update # Skip refreshing all module indexes or a specific ecosystem
31+
#--/update # Skip refreshing all module indexes or a specific ecosystem
3132
--exclude
3233
--to # Short name or spec of CompUnit::Repository to install to
3334
--install-to # Short name or spec of CompUnit::Repository to install to
@@ -58,7 +59,7 @@ extern "zef fetch" [
5859
--force # Ignore errors
5960
--force-fetch # Ignore errors
6061
--update # Force a refresh for all module indexes or a specific ecosystem
61-
--/update # Skip refreshing all module indexes or a specific ecosystem
62+
#--/update # Skip refreshing all module indexes or a specific ecosystem
6263
...args
6364
]
6465

@@ -79,15 +80,15 @@ extern "zef update" [
7980
extern "zef upgrade" [
8081
--fetch
8182
--build
82-
--/build # Skip the building phase
83+
#--/build # Skip the building phase
8384
--test
84-
--/test # Skip the testing phase
85+
#--/test # Skip the testing phase
8586
--depends
86-
--/depends # Do not fetch runtime dependencies
87+
#--/depends # Do not fetch runtime dependencies
8788
--build-depends
88-
--/build-depends # Do not fetch build dependencies
89+
#--/build-depends # Do not fetch build dependencies
8990
--test-depends
90-
--/test-depends # Do not fetch test dependencies
91+
#--/test-depends # Do not fetch test dependencies
9192
--force # Ignore errors
9293
--force-resolve # Ignore errors
9394
--force-fetch # Ignore errors
@@ -98,7 +99,7 @@ extern "zef upgrade" [
9899
--dry # Run all phases except the actual installations
99100
--serial # Install each dependency after passing testing and before building/testing the next dependency
100101
--update # Force a refresh for all module indexes or a specific ecosystem
101-
--/update # Skip refreshing all module indexes or a specific ecosystem
102+
#--/update # Skip refreshing all module indexes or a specific ecosystem
102103
--exclude
103104
--to # Short name or spec of CompUnit::Repository to install to
104105
--install-to # Short name or spec of CompUnit::Repository to install to
@@ -108,51 +109,51 @@ extern "zef upgrade" [
108109
# Show a list of possible distribution candidates for the given terms
109110
extern "zef search" [
110111
--update # Force a refresh for all module indexes or a specific ecosystem
111-
--/update # Skip refreshing all module indexes or a specific ecosystem
112+
#--/update # Skip refreshing all module indexes or a specific ecosystem
112113
...args
113114
]
114115

115116
# Show detailed distribution information
116117
extern "zef info" [
117118
--update # Force a refresh for all module indexes or a specific ecosystem
118-
--/update # Skip refreshing all module indexes or a specific ecosystem
119+
#--/update # Skip refreshing all module indexes or a specific ecosystem
119120
...args
120121
]
121122

122123
# Browse support urls (bugtracker etc)
123124
extern "zef browse" [
124125
--open
125-
--/open
126+
#--/open
126127
...args
127128
]
128129

129130
# List available distributions
130131
extern "zef list" [
131132
--update # Force a refresh for all module indexes or a specific ecosystem
132-
--/update # Skip refreshing all module indexes or a specific ecosystem
133+
#--/update # Skip refreshing all module indexes or a specific ecosystem
133134
--installed(-i)
134135
...args
135136
]
136137

137138
# List full dependencies for a given identity
138139
extern "zef depends" [
139140
--depends
140-
--/depends # Do not fetch runtime dependencies
141+
#--/depends # Do not fetch runtime dependencies
141142
--build-depends
142-
--/build-depends # Do not fetch build dependencies
143+
#--/build-depends # Do not fetch build dependencies
143144
--test-depends
144-
--/test-depends # Do not fetch test dependencies
145+
#--/test-depends # Do not fetch test dependencies
145146
...args
146147
]
147148

148149
# List all distributions directly depending on a given identity
149150
extern "zef rdepends" [
150151
--depends
151-
--/depends # Do not fetch runtime dependencies
152+
#--/depends # Do not fetch runtime dependencies
152153
--build-depends
153-
--/build-depends # Do not fetch build dependencies
154+
#--/build-depends # Do not fetch build dependencies
154155
--test-depends
155-
--/test-depends # Do not fetch test dependencies
156+
#--/test-depends # Do not fetch test dependencies
156157
...args
157158
]
158159

@@ -167,15 +168,15 @@ extern "zef locate" [
167168
extern "zef smoke" [
168169
--fetch
169170
--build
170-
--/build # Skip the building phase
171+
#--/build # Skip the building phase
171172
--test
172-
--/test # Skip the testing phase
173+
#--/test # Skip the testing phase
173174
--depends
174-
--/depends # Do not fetch runtime dependencies
175+
#--/depends # Do not fetch runtime dependencies
175176
--build-depends
176-
--/build-depends # Do not fetch build dependencies
177+
#--/build-depends # Do not fetch build dependencies
177178
--test-depends
178-
--/test-depends # Do not fetch test dependencies
179+
#--/test-depends # Do not fetch test dependencies
179180
--force # Ignore errors
180181
--force-resolve # Ignore errors
181182
--force-fetch # Ignore errors
@@ -186,7 +187,7 @@ extern "zef smoke" [
186187
--dry # Run all phases except the actual installations
187188
--serial # Install each dependency after passing testing and before building/testing the next dependency
188189
--update # Force a refresh for all module indexes or a specific ecosystem
189-
--/update # Skip refreshing all module indexes or a specific ecosystem
190+
#--/update # Skip refreshing all module indexes or a specific ecosystem
190191
--exclude
191192
--to # Short name or spec of CompUnit::Repository to install to
192193
--install-to # Short name or spec of CompUnit::Repository to install to

modules/base16/base16.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export def from-file-table [base_txt: path] {
142142

143143
# Replace {{baseXX-hex}} with proper colors, such as #ffeedd
144144
def apply-base16-mustache [template: string] {
145-
reduce -f $template {
145+
reduce -f $template { |it|
146146
let subs = $"\{\{($it.item.name)-hex\}\}" # regex
147147
let color = $it.item.color
148148
$it.acc | str replace -a $subs $color

0 commit comments

Comments
 (0)