Skip to content

Commit

Permalink
🐛 fix a couple of parser errors (nushell#782)
Browse files Browse the repository at this point in the history
This is some legwork to the CI
- [x] fix one `get-row.nu` before 0.60, just because it was easy
- [x] `modules/formats/to-ini.nu`
- [x] `modules/git/git-v2.nu`
- [x] `modules/git/git.nu`
- [x] `modules/log/log.nu`
- [x] `modules/weather/weatherdark.nu`
- [x] `sourced/api_wrappers/worlframalpha.nu`
- [x] `sourced/cool-oneliners/pwd-short.nu`
- [x] `sourced/github/branch-protections/branch-protections.nu`
- [x] `sourced/gitlab/gitlab.nu`
- [x] `sourced/misc/nu_defs.nu`
- [x] `sourced/update-path.nu`
- [x] `sourced/webscraping/shell_starts.nu`
I moved some auto-generated commands:
- [x] `ack` 
- [x] `as`
- [x] `curl`
- [x] `fsarprc`
- [x] `fsarpri`
- [x] `godoc`
- [x] `mysql` 
- [x] and `xgettext` 
to custom, so we keep the modifications.
I had to comment some of the flags because the parser is not able to
parse some flags. Those are explained in comments
  • Loading branch information
AucaCoyan committed Mar 10, 2024
1 parent 1ccc379 commit bc6273d
Show file tree
Hide file tree
Showing 24 changed files with 232 additions and 219 deletions.
2 changes: 1 addition & 1 deletion before_v0.60/stdlib_candidate/get-row.nu
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ def get-row [
row_num:int # A 0 indexed row
] {

nth $row_num | table -n $row_num
nth $row_num | table --index $row_num
}
66 changes: 66 additions & 0 deletions custom-completions/ack/ack-completions.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# copied from auto-generated completions

extern "ack" [
--ignore-case(-i) # Ignore case
--smart-case # Ignore case when pattern contains no uppercase
--no-smart-case # Dont ignore case
--invert-match(-v) # Invert match
--word-regexp(-w) # Match only whole words
--literal(-Q) # Quote all metacharacters
--lines # Only print line(s) NUM of each file
--files-with-matches(-l) # Only print filenames containing matches
--files-without-matches(-L) # Only print filenames with no matches
--output # Output the evaluation of Perl expression for each line
--passthru # Print all lines
--match # Specify pattern explicitly
--max-count(-m) # Stop searching in each file after NUM matches
--with-filename(-H) # Print the filename for each match
--no-filename(-h) # Suppress the prefixing filename on output
--count(-c) # Show number of lines matching per file
--column # Show column number of first match
--no-column # Dont show column number of first match
--print0 # Print null byte as separator between filenames
--pager # Pipes all ack output through command
--no-pager # Do not send output through a pager
--heading # Prints a filename heading above files results
--no-heading # Dont print a filename heading above files results
--break # Print a break between results
--no-break # Dont print a break between results
--group # Filename heading and line break between results
--no-group # No filename heading and no line breaks between results
--color # Highlight the matching text
--no-colour # Dont highlight the matching text
--color-filename # Set the color for filenames
--color-match # Set the color for matches
--color-lineno # Set the color for line numbers
--flush # Flush output immediately
--sort-files # Sort the found files lexically
--show-types # Show which types each file has
--files-from # Read the list of files to search from file
--ignore-directory # Ignore directory
--no-ignore-directory # Dont ignore directory
--ignore-file # Add filter for ignoring files
--recurse(-R) # Recurse into subdirectories
--no-recurse(-n) # No descending into subdirectories
--follow # Follow symlinks
--no-follow # Dont follow symlinks
--known-types(-k) # Include only recognized files
--type # Include only X files
--type-set # Replaces definition of type
--type-add # Specify definition of type
--type-del # Removes all filters associated with type
--no-env # Ignores environment variables and ackrc files
--ackrc # Specifies location of ackrc file
--ignore-ack-defaults # Ignore default definitions ack includes
--create-ackrc # Outputs default ackrc
--help(-?) # Shows help
--help-types # Shows all known types
--dump # Dump information on which options are loaded
--filter # Forces ack to treat input as a pipe
--no-filter # Forces ack to treat input as tty
--man # Shows man page
--version # Displays version and copyright
--thpppt # Bill the Cat
--bar # The warning admiral
...args
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "as" [
--sectname-subst # Enable section name substitution sequences
--gen-debug(-g) # Generate debugging information
--gstabs # Generate STABS debugging information
--gstabs+ # Generate STABS debug info with GNU extensions
# --gstabs+ # (breaks the nu parser) Generate STABS debug info with GNU extensions
--gdwarf-2 # Generate DWARF2 debugging information
--gdwarf-sections # Generate per-function section names for DWARF line information
--help # Show help message and exit
Expand Down Expand Up @@ -42,7 +42,7 @@ extern "as yes no" [
--sectname-subst # Enable section name substitution sequences
--gen-debug(-g) # Generate debugging information
--gstabs # Generate STABS debugging information
--gstabs+ # Generate STABS debug info with GNU extensions
# --gstabs+ # (breaks the nu parser) Generate STABS debug info with GNU extensions
--gdwarf-2 # Generate DWARF2 debugging information
--gdwarf-sections # Generate per-function section names for DWARF line information
--help # Show help message and exit
Expand Down
65 changes: 0 additions & 65 deletions custom-completions/auto-generate/completions/ack.nu

This file was deleted.

67 changes: 0 additions & 67 deletions custom-completions/auto-generate/completions/fsharpc.nu

This file was deleted.

48 changes: 0 additions & 48 deletions custom-completions/auto-generate/completions/fsharpi.nu

This file was deleted.

Loading

0 comments on commit bc6273d

Please sign in to comment.