diff --git a/README.md b/README.md index 42a1454ab..e75fa8534 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/before_v0.60/docker/README.md b/before_v0.60/docker/README.md deleted file mode 100644 index fc4cca3fd..000000000 --- a/before_v0.60/docker/README.md +++ /dev/null @@ -1,16 +0,0 @@ -### Docker - -This directory contains few simple scripts to simplify docker workflow in nushell - -### Deployment - -source the scripts in startup section of your `config.toml` file - -### Usage -* docker.nu - Wrapper around regular docker command, returns a formatted nushell table -* compose.nu - Finds compose files of all running containers and then stops them via `docker-compose down` - -### Notes -* Both commands assume the user is a mamber of `docker` group, if that is not the case prepend the commands with `sudo` - -* docker.nu should be sourced before compose.nu in your `config.toml` file as the latter uses the former \ No newline at end of file diff --git a/before_v0.60/docker/compose.nu b/before_v0.60/docker/compose.nu deleted file mode 100644 index 313aca774..000000000 --- a/before_v0.60/docker/compose.nu +++ /dev/null @@ -1,14 +0,0 @@ -# stops all running containers via their compose files -def compose [] { - docker ps| - each { - docker inspect $it.ID| - get Config.Labels| - select 'com.docker.compose.project.working_dir' 'com.docker.compose.project.config_files'| - rename dir file - }| - uniq| - each { - docker-compose -f (build-string $it.dir '/' $it.file) down - } -} diff --git a/before_v0.60/docker/docker.nu b/before_v0.60/docker/docker.nu deleted file mode 100644 index ac498f8d8..000000000 --- a/before_v0.60/docker/docker.nu +++ /dev/null @@ -1,22 +0,0 @@ -# docker wrapper that returns a nushell table -def docker [ - ...args:string # command to be passed to the real docker command - ] { - let data = (^docker $args --format={{json .}}|lines|each {$it|from json}) - if Labels in ($data|get) { - $data|docker labels - } { - $data - } - -} - -# subcommand used to reformat docker labels into their own table -def 'docker labels' [] { - update Labels { - get Labels| - split row ','| - where ($it|str starts-with ' ') == $false| - split column '=' name value - } -} diff --git a/custom-completions/auto-generate/completions/git.nu b/custom-completions/auto-generate/completions/git.nu deleted file mode 100644 index f4cc19992..000000000 --- a/custom-completions/auto-generate/completions/git.nu +++ /dev/null @@ -1,1450 +0,0 @@ -[# Display the manual of a git command -extern "git" [ - - ...args -] -# Download objects and refs from another repository -extern "git fetch" [ - --unshallow # Convert a shallow repository to a complete one - --set-upstream # Add upstream (tracking) reference - --quiet(-q) # Be more quiet - --verbose(-v) # Be more verbose - --append(-a) # Append to .git/FETCH_HEAD instead of overwriting - --upload-pack # Path to upload pack on remote end - --force(-f) # Force update of local branches - --prune(-p) # Prune remote-tracking branches no longer on remote - --all # Fetch all remotes - --atomic # Use atomic transfer to update references - --multiple(-m) # Fetch from multiple remotes - --tags(-t) # Fetch all tags and associated objects - --prune-tags(-P) # Prune local tags no longer on remote and clobber changed tags - --prefetch # Modify the refspec to replace all refs within refs/prefetch/ - --jobs(-j) # Numbers of submodules fetched in parallel - --dry-run # Dry run - --depth # Limit number of commits - --with-fetch-head # Write fetched references to the FETCH_HEAD file - --update-shallow # Accept refs that update .git/shallow - --keep(-k) # Keep downloaded pack - --update-head-ok(-u) # Allow updating of HEAD ref - --progress # Force progress reporting - --deepen # Deepen history of shallow clones - --shallow-since # Deepen history of shallow repository based on time - --shallow-exclude # Deepen history of shallow clone, excluding rev - --unshallow # Convert to a complete repository - --refetch # Re-fetch without negotiating common commits - ...args -] -# Rewrite branches -extern "git filter-branch" [ - --env-filter # This filter may be used if you only need to modify the environment - --tree-filter # This is the filter for rewriting the tree and its contents - --index-filter # This is the filter for rewriting the index - --parent-filter # This is the filter for rewriting the commit - --msg-filter # This is the filter for rewriting the commit messages - --commit-filter # This is the filter for performing the commit - --tag-name-filter # This is the filter for rewriting tag names - --subdirectory-filter # Only look at the history which touches the given subdirectory - --prune-empty # Ignore empty commits generated by filters - --original # Use this option to set the namespace where the original commits will be stored - --force(-f) # Filter even with refs in refs/original or existing temp directory - ...args -] -# Manage set of tracked repositories -extern "git remote" [ - --verbose(-v) # Be verbose - --tags # Import every tag from a remote with git fetch - --no-tags # Don't import tags from a remote with git fetch - --add # Add to the list of currently tracked branches instead of replacing it - --push # Manipulate push URLs instead of fetch URLs - --add # Add new URL instead of changing the existing URLs - --delete # Remove URLs that match specified URL - --push # Query push URLs rather than fetch URLs - --all # All URLs for the remote will be listed - --dry-run # Report what will be pruned but do not actually prune it - --prune # Prune all remotes that are updated - ...args -] -# Adds a new remote -extern "git add" [ - --tags # Import every tag from a remote with git fetch - --no-tags # Don't import tags from a remote with git fetch - --dry-run(-n) # Don't actually add the file(s) - --verbose(-v) # Be verbose - --force(-f) # Allow adding otherwise ignored files - --interactive(-i) # Interactive mode - --patch(-p) # Interactively choose hunks to stage - --edit(-e) # Manually create a patch - --update(-u) # Only match tracked files - --all(-A) # Match files both in working tree and index - --intent-to-add(-N) # Record only the fact that the path will be added later - --refresh # Don't add the file(s), but only refresh their stat - --chmod - --ignore-errors # Ignore errors - --ignore-missing # Check if any of the given files would be ignored - --force(-f) # Overwrite existing notes - --allow-empty # Allow empty note - --force(-f) # Override safeguards - --detach # Detach HEAD in the new working tree - --checkout # Checkout after creating working tree - --no-checkout # Suppress checkout - --guess-remote - --no-guess-remote - --track # Mark as "upstream" from the new branch - --no-track # Dont mark as "upstream" from the new branch - --lock # Lock working tree after creation - --quiet(-q) # Suppress feedback messages - --force # Also add ignored submodule path - ...args -] -# Removes a remote -extern "git rm" [ - ----term-good # Print the term for the old state - ----term-bad # Print the term for the new state - --cached # Unstage files from the index - --ignore-unmatch # Exit with a zero status even if no files matched - --quiet(-q) # Be quiet - --force(-f) # Override the up-to-date check - --dry-run(-n) # Dry run - --sparse # Allow updating index entries outside of the sparse-checkout cone - --output-directory(-o) - --no-stat(-p) # Generate plain patches without diffstat - --no-patch(-s) # Suppress diff output - --minimal # Spend more time to create smaller diffs - --patience # Generate diff with the 'patience' algorithm - --histogram # Generate diff with the 'histogram' algorithm - --stdout # Print all commits to stdout in mbox format - --numstat # Show number of added/deleted lines in decimal notation - --shortstat # Output only last line of the stat - --summary # Output a condensed summary of extended header information - --no-renames # Disable rename detection - --full-index # Show full blob object names - --binary # Output a binary diff for use with git apply - --find-copies-harder # Also inspect unmodified files as source for a copy - --text(-a) # Treat all files as text - --ignore-space-at-eol # Ignore changes in whitespace at EOL - --ignore-space-change(-b) # Ignore changes in amount of whitespace - --ignore-all-space(-w) # Ignore whitespace when comparing lines - --ignore-blank-lines # Ignore changes whose lines are all blank - --function-context(-W) # Show whole surrounding functions of changes - --ext-diff # Allow an external diff helper to be executed - --no-ext-diff # Disallow external diff helpers - --no-textconv # Disallow external text conversion filters for binary files (Default) - --textconv # Allow external filters for binary files (Resulting diff is unappliable) - --no-prefix # Do not show source or destination prefix - --numbered(-n) # Name output in [Patch n/m] format, even with a single patch - --no-numbered(-N) # Name output in [Patch] format, even with multiple patches - ...args -] -# Removes a remote -extern "git remove" [ - --stdin # Read object names from stdin - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --ignore-missing # Do not throw error on deleting non-existing object note - --force(-f) # Override safeguards - ...args -] -# Shows a remote -extern "git show" [ - --abbrev # Show only a partial prefix instead of the full 40-byte hexadecimal object name - --binary # Output a binary diff that can be applied with "git-apply - --check # Warn if changes introduce conflict markers or whitespace errors - --color # Show colored diff - --color-moved # Moved lines of code are colored differently - --color-words # Equivalent to --word-diff=color plus --word-diff-regex= - --compact-summary # Output a condensed summary of extended header information - --dst-prefix # Show the given destination prefix instead of "b/ - --ext-diff # Allow an external diff helper to be executed - --find-copies-harder # Inspect unmodified files as candidates for the source of copy - --find-object # Look for differences that change the number of occurrences of the object - --full-index # Show the full pre- and post-image blob object names on the "index" line - --histogram # Generate a diff using the "histogram diff" algorithm - --ignore-blank-lines # Ignore changes whose lines are all blank - --ignore-cr-at-eol # Ignore carrige-return at the end of line when doing a comparison - --ignore-space-at-eol # Ignore changes in whitespace at EOL - --indent-heuristic # Enable the heuristic that shift diff hunk boundaries - --inter-hunk-context # Show the context between diff hunks, up to the specified number of lines - --ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached - --line-prefix # Prepend an additional prefix to every line of output - --minimal # Spend extra time to make sure the smallest possible diff is produced - --name-only # Show only names of changed files - --name-status # Show only names and status of changed files - --no-color # Turn off colored diff - --no-ext-diff # Disallow external diff drivers - --no-indent-heuristic # Disable the indent heuristic - --no-prefix # Do not show any source or destination prefix - --no-renames # Turn off rename detection - --no-textconv # Disallow external text conversion filters to be run when comparing binary files - --numstat # Shows number of added/deleted lines in decimal notation - --patch-with-raw # Synonym for -p --raw - --patch-with-stat # Synonym for -p --stat - --patience # Generate a diff using the "patience diff" algorithm - --pickaxe-all # When -S or -G finds a change, show all the changes in that changeset - --pickaxe-regex # Treat the given to -S as an extended POSIX regular expression to match - --relative # Exclude changes outside the directory and show relative pathnames - --shortstat # Output only the last line of the --stat format containing total number of modified files - --src-prefix # Show the given source prefix instead of "a/ - --stat # Generate a diffstat - --stat # Generate a diffstat - --summary # Output a condensed summary of extended header information - --textconv # Allow external text conversion filters to be run when comparing binary files - --word-diff # Show a word diff - --word-diff-regex # Use to decide what a word is - --text(-a) # Treat all files as text - --break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create - --ignore-space-change(-b) # Ignore changes in amount of whitespace - --find-copies(-C) # Detect copies as well as renames - --irreversible-delete(-D) # Omit the preimage for deletes - --find-renames(-M) # Detect and report renames - --function-context(-W) # Show whole surrounding functions of changes - --ignore-all-space(-w) # Ignore whitespace when comparing lines - --anchored # Generate a diff using the "anchored diff" algorithm - --abbrev-commit # Show only a partial hexadecimal commit object name - --no-abbrev-commit # Show the full 40-byte hexadecimal commit object name - --oneline # Shorthand for "--pretty=oneline --abbrev-commit - --encoding # Re-code the commit log message in the encoding - --expand-tabs # Perform a tab expansion in the log message - --no-expand-tabs # Do not perform a tab expansion in the log message - --no-notes # Do not show notes - --no-patch(-s) # Suppress diff output - --show-signature # Check the validity of a signed commit object - --remotes(-r) # Shows the remote tracking branches - --all(-a) # Show both remote-tracking branches and local branches - --current # Includes the current branch to the list of revs to be shown - --topo-order # Makes commits appear in topological order - --date-order # Makes commits appear in date order - --sparse # Shows merges only reachable from one tip - --no-name # Do not show naming strings for each commit - --sha1-name # Name commits with unique prefix - --no-color # Turn off colored output - ...args -] -# Deletes all stale tracking branches -extern "git prune" [ - --dry-run # Report what will be pruned but do not actually prune it - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --dry-run(-n) # Just report what it would remove - --verbose(-v) # Report all removed objects - --progress # Show progress - --dry-run(-n) # Do not remove anything - --verbose(-v) # Report all removals - ...args -] -# Fetches updates -extern "git update" [ - --prune # Prune all remotes that are updated - --init # Initialize all submodules - --checkout # Checkout the superproject's commit on a detached HEAD in the submodule - --merge # Merge the superproject's commit into the current branch of the submodule - --rebase # Rebase current branch onto the superproject's commit - --no-fetch(-N) # Don't fetch new objects from the remote - --remote # Instead of using superproject's SHA-1, use the state of the submodule's remote-tracking branch - --force # Discard local changes when switching to a different commit & always run checkout - --recursive # Traverse submodules recursively - ...args -] -# Renames a remote -extern "git rename" [ - - ...args -] -# Sets the default branch for a remote -extern "git set-head" [ - - ...args -] -# Changes URLs for a remote -extern "git set-url" [ - --push # Manipulate push URLs instead of fetch URLs - --add # Add new URL instead of changing the existing URLs - --delete # Remove URLs that match specified URL - ...args -] -# Retrieves URLs for a remote -extern "git get-url" [ - --push # Query push URLs rather than fetch URLs - --all # All URLs for the remote will be listed - ...args -] -# Changes the list of branches tracked by a remote -extern "git set-branches" [ - --add # Add to the list of currently tracked branches instead of replacing it - ...args -] -# Shows the commits on branches -extern "git show-branch" [ - --remotes(-r) # Shows the remote tracking branches - --all(-a) # Show both remote-tracking branches and local branches - --current # Includes the current branch to the list of revs to be shown - --topo-order # Makes commits appear in topological order - --date-order # Makes commits appear in date order - --sparse # Shows merges only reachable from one tip - --no-name # Do not show naming strings for each commit - --sha1-name # Name commits with unique prefix - --no-color # Turn off colored output - ...args -] -# Apply a series of patches from a mailbox -extern "git am" [ - --signoff(-s) # Add a Signed-off-By trailer to commit message - --keep-non-patch # Only strip bracket pairs containing PATCH - --no-keep-cr # Override am.keepcr to false - --scissors(-c) # Remove everything in body before scissors - --no-scissors # Ignore scissor lines - --no-messageid # Do not add message id to commit message - --quiet(-q) # Supress logs - --no-utf8 # Disable all charset re-encoding of metadata - --3way(-3) # Fall back to three way merge on patch failure - --no-3way # Do not fall back to three way merge on patch failure - --rerere-autoupdate # Allow rerere to update index if possible - --ignore-space-change # Pass --ignore-space-change to git apply - --reject # Pass --reject to git apply - --interactive(-i) # Run interactively - --commiter-date-is-author-date # Treat commiter date as author date - --ignore-date # Treat author date as commiter date - --skip # Skip current patch - --no-gpg-sign # Do not sign commits - --continue(-r) # Mark patch failures as resolved - --abort # Abort patch operation and restore branch - --quit # Abort without restoring branch - --show-current-patch # Show message at which patch failures occured - --ignore-whitespace # Ignore whitespace change in context lines - --message-id(-m) # Copy message id to the end of commit message - --keep-cr # Do not remove \\r from lines starting with \\n\\r - --root # Do not treat root commits as boundaries - --show-stats # Include additional statistics - --reverse # Walk history forward instead of backward - --porcelain(-p) # Show in a format designed for machine consumption - --line-porcelain # Show the porcelain format - --incremental # Show the result incrementally - --show-name(-f) # Show the filename in the original commit - --show-number(-n) # Show the line number in the original commit - --show-email(-e) # Show the author email instead of author name - ...args -] -# Show message at which patch failures occured -extern "git diff raw" [ - - ...args -] -# Checkout and switch to a branch -extern "git checkout" [ - --track(-t) # Track a new branch - --theirs # Keep staged changes - --ours # Keep unmerged changes - --recurse-submodules # Update the work trees of submodules - --no-recurse-submodules # Do not update the work trees of submodules - ...args -] -# Apply a patch on a git index file and a working tree -extern "git apply" [ - --stat # Generate a diffstat - --numstat # Show number of additions and deletions - --summary # Output a condensed summary - --check # Just check if the patches can be applied - --index # Apply patch to index and working tree - --cached # Apply patch to index - --intent-to-add # Add entry for file in index with no content - --3way(-3) # Attempt a 3 way merge on conflicts - --reverse(-R) # Apply the patch in reverse - --reject # Leave rejected hunks in *.rej files - --unidiff-zero # Do not break on diffs generated using --unified=0 - --apply # Always apply patches - --no-add # Ignore additions made by patches - --binary # Also patch binaries - --ignore-whitespace # Ignore whitespace change in context lines - --inaccurate-eof # Work around some diff versions not detecting newlines at end of file - --verbose(-v) # Report progress to stderr - --recount # Do not trust the line counts in the hunk headers - --unsafe-paths # Allow patches that work outside working area - ...args -] -# Create an archive of files from a named tree -extern "git archive" [ - --list(-l) # Show all available formats - --verbose(-v) # Be verbose - --worktree-attributes # Look for attributes in .gitattributes files in the working tree as well - ...args -] -# Find the change that introduced a bug by binary search -extern "git bisect" [ - --no-checkout # Do not checkout tree, only update BISECT_HEAD - --first-parent # On merge commits, follow only the first parent commit - ----term-good # Print the term for the old state - ----term-bad # Print the term for the new state - ...args -] -# List, create, or delete branches -extern "git branch" [ - --env-filter # This filter may be used if you only need to modify the environment - --tree-filter # This is the filter for rewriting the tree and its contents - --index-filter # This is the filter for rewriting the index - --parent-filter # This is the filter for rewriting the commit - --msg-filter # This is the filter for rewriting the commit messages - --commit-filter # This is the filter for performing the commit - --tag-name-filter # This is the filter for rewriting tag names - --subdirectory-filter # Only look at the history which touches the given subdirectory - --prune-empty # Ignore empty commits generated by filters - --original # Use this option to set the namespace where the original commits will be stored - --force(-f) # Filter even with refs in refs/original or existing temp directory - --add # Add to the list of currently tracked branches instead of replacing it - --remotes(-r) # Shows the remote tracking branches - --all(-a) # Show both remote-tracking branches and local branches - --current # Includes the current branch to the list of revs to be shown - --topo-order # Makes commits appear in topological order - --date-order # Makes commits appear in date order - --sparse # Shows merges only reachable from one tip - --no-name # Do not show naming strings for each commit - --sha1-name # Name commits with unique prefix - --no-color # Turn off colored output - --delete(-d) # Delete branch - --force(-f) # Reset branch even if it already exists - --move(-m) # Rename branch - --copy(-c) # Copy branch - --all(-a) # Lists both local and remote branches - --track(-t) # Track remote branch - --no-track # Do not track remote branch - --set-upstream-to # Set remote branch to track - --merged # List branches that have been merged - --no-merged # List branches that have not been merged - --unset-upstream # Remove branch upstream information - --branch(-b) # Specify the branch to use - --default(-d) # Use default branch of the submodule - ...args -] -# Find commits yet to be applied to upstream [upstream [head]] -extern "git cherry" [ - --edit(-e) # Edit the commit message prior to committing - --no-commit(-n) # Apply changes without making any commit - --signoff(-s) # Add Signed-off-by line to the commit message - --ff # Fast-forward if possible - --continue # Continue the operation in progress - --abort # Cancel the operation - --skip # Skip the current commit and continue with the rest of the sequence - ...args -] -# Apply the change introduced by an existing commit -extern "git cherry-pick" [ - --edit(-e) # Edit the commit message prior to committing - --no-commit(-n) # Apply changes without making any commit - --signoff(-s) # Add Signed-off-by line to the commit message - --ff # Fast-forward if possible - --continue # Continue the operation in progress - --abort # Cancel the operation - --skip # Skip the current commit and continue with the rest of the sequence - ...args -] -# Clone a repository into a new directory -extern "git clone" [ - --no-hardlinks # Copy files instead of using hardlinks - --quiet(-q) # Operate quietly and do not report progress - --verbose(-v) # Provide more information on what is going on - --no-checkout(-n) # No checkout of HEAD is performed after the clone is complete - --bare # Make a bare Git repository - --mirror # Set up a mirror of the source repository - --origin(-o) # Use a specific name of the remote instead of the default - --branch(-b) # Use a specific branch instead of the one used by the cloned repository - --depth # Truncate the history to a specified number of revisions - --recursive # Initialize all submodules within the cloned repository - ...args -] -# Record changes to the repository -extern "git commit" [ - --amend # Amend the log message of the last commit - --all(-a) # Automatically stage modified and deleted files - --patch(-p) # Use interactive patch selection interface - --fixup # Fixup commit to be used with rebase --autosquash - --squash # Squash commit to be used with rebase --autosquash - --reset-author # When amending, reset author of commit to the committer - --no-edit # Use the selected commit message without launching an editor - --no-gpg-sign # Do not sign commit - --no-verify(-n) # Do not run pre-commit and commit-msg hooks - --allow-empty # Create a commit with no changes - --allow-empty-message # Create a commit with no commit message - --signoff(-s) # Append Signed-off-by trailer to commit message - --no-signoff # Do not append Signed-off-by trailer to commit message - ...args -] -# Count unpacked number of objects and their disk consumption -extern "git count-objects" [ - --verbose(-v) # Be verbose - --human-readable(-H) # Print in human readable format - ...args -] -# A really simple server for git repositories -extern "git daemon" [ - --strict-paths # Match paths exactly - --base-path-relaxed # When looking up with base path fails, try without it - --export-all # Allow pulling from all directories - --inetd # Run as inetd service - --syslog # --log-destination=syslog - --verbose # Log all details - --reuseaddr # Reuse address when binding to listening server - --detach # Detach from shell - --informative-errors # Report more verbose errors to clients - --no-informative-errors # Report less verbose errors to clients - ...args -] -# Give an object a human readable name based on an available ref -extern "git describe" [ - --dirty # Describe the state of the working tree, append dirty if there are local changes - --broken # Describe the state of the working tree, append -broken instead of erroring - --all # Use all tags, not just annotated - --tags # Use all commits/tags, not just annotated tags - --contains # Find the tag that comes after the commit - --abbrev # Use digits, or as many digits as needed to form a unique object name - --candidates # Consider up to candidates - --exact-match # Only output exact matches - --debug # Display debug info - --long # Always output the long format - --match # Only consider tags matching the given glob pattern - --exclude # Do not consider tags matching the given glob pattern - --always # Show uniquely abbreviated commit object as fallback - --first-parent # Follow only the first parent of a merge commit - ...args -] -# Show changes between commits, commit and working tree, etc -extern "git diff" [ - --abbrev # Show only a partial prefix instead of the full 40-byte hexadecimal object name - --binary # Output a binary diff that can be applied with "git-apply - --check # Warn if changes introduce conflict markers or whitespace errors - --color # Show colored diff - --color-moved # Moved lines of code are colored differently - --color-words # Equivalent to --word-diff=color plus --word-diff-regex= - --compact-summary # Output a condensed summary of extended header information - --dst-prefix # Show the given destination prefix instead of "b/ - --ext-diff # Allow an external diff helper to be executed - --find-copies-harder # Inspect unmodified files as candidates for the source of copy - --find-object # Look for differences that change the number of occurrences of the object - --full-index # Show the full pre- and post-image blob object names on the "index" line - --histogram # Generate a diff using the "histogram diff" algorithm - --ignore-blank-lines # Ignore changes whose lines are all blank - --ignore-cr-at-eol # Ignore carrige-return at the end of line when doing a comparison - --ignore-space-at-eol # Ignore changes in whitespace at EOL - --indent-heuristic # Enable the heuristic that shift diff hunk boundaries - --inter-hunk-context # Show the context between diff hunks, up to the specified number of lines - --ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached - --line-prefix # Prepend an additional prefix to every line of output - --minimal # Spend extra time to make sure the smallest possible diff is produced - --name-only # Show only names of changed files - --name-status # Show only names and status of changed files - --no-color # Turn off colored diff - --no-ext-diff # Disallow external diff drivers - --no-indent-heuristic # Disable the indent heuristic - --no-prefix # Do not show any source or destination prefix - --no-renames # Turn off rename detection - --no-textconv # Disallow external text conversion filters to be run when comparing binary files - --numstat # Shows number of added/deleted lines in decimal notation - --patch-with-raw # Synonym for -p --raw - --patch-with-stat # Synonym for -p --stat - --patience # Generate a diff using the "patience diff" algorithm - --pickaxe-all # When -S or -G finds a change, show all the changes in that changeset - --pickaxe-regex # Treat the given to -S as an extended POSIX regular expression to match - --relative # Exclude changes outside the directory and show relative pathnames - --shortstat # Output only the last line of the --stat format containing total number of modified files - --src-prefix # Show the given source prefix instead of "a/ - --stat # Generate a diffstat - --stat # Generate a diffstat - --summary # Output a condensed summary of extended header information - --textconv # Allow external text conversion filters to be run when comparing binary files - --word-diff # Show a word diff - --word-diff-regex # Use to decide what a word is - --text(-a) # Treat all files as text - --break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create - --ignore-space-change(-b) # Ignore changes in amount of whitespace - --find-copies(-C) # Detect copies as well as renames - --irreversible-delete(-D) # Omit the preimage for deletes - --find-renames(-M) # Detect and report renames - --function-context(-W) # Show whole surrounding functions of changes - --ignore-all-space(-w) # Ignore whitespace when comparing lines - --anchored # Generate a diff using the "anchored diff" algorithm - --cached # Show diff of changes in the index - --staged # Show diff of changes in the index - --no-index # Compare two paths on the filesystem - --exit-code # Exit with 1 if there were differences or 0 if no differences - --quiet # Disable all output of the program, implies --exit-code - --base(-1) # Compare the working tree with the "base" version - --ours(-2) # Compare the working tree with the "our branch - --theirs(-3) # Compare the working tree with the "their branch - --cached # Visually show diff of changes in the index - --gui(-g) # Use `diff.guitool` instead of `diff.tool` - --dir-diff(-d) # Perform a full-directory diff - --prompt # Prompt before each invocation of the diff tool - --no-prompt(-y) # Do not prompt before launching a diff tool - --symlinks # Use symlinks in dir-diff mode - --tool-help # Print a list of diff tools that may be used with `--tool` - --trust-exit-code # Exit when an invoked diff tool returns a non-zero exit code - --extcmd(-x) # Specify a custom command for viewing diffs - --no-gui # Overrides --gui setting - --creation-factor # Percentage by which creation is weighted - --no-dual-color # Use simple diff colors - ...args -] -# Open diffs in a visual tool -extern "git difftool" [ - --cached # Visually show diff of changes in the index - --gui(-g) # Use `diff.guitool` instead of `diff.tool` - --dir-diff(-d) # Perform a full-directory diff - --prompt # Prompt before each invocation of the diff tool - --no-prompt(-y) # Do not prompt before launching a diff tool - --symlinks # Use symlinks in dir-diff mode - --tool-help # Print a list of diff tools that may be used with `--tool` - --trust-exit-code # Exit when an invoked diff tool returns a non-zero exit code - --extcmd(-x) # Specify a custom command for viewing diffs - --no-gui # Overrides --gui setting - ...args -] -# Cleanup unnecessary files and optimize the local repository -extern "git gc" [ - --aggressive # Aggressively optimize the repository - --auto # Checks any housekeeping is required and then run - --prune # Prune loose objects older than date - --no-prune # Do not prune any loose objects - --quiet # Be quiet - --force # Force `git gc` to run - --keep-largest-pack # Ignore `gc.bigPackThreshold` - ...args -] -# Print lines matching a pattern -extern "git grep" [ - --cached # Search blobs registered in the index file - --no-index # Search files in the current directory not managed by Git - --untracked # Search also in untracked files - --no-exclude-standard # Also search in ignored files by not honoring the .gitignore mechanism - --exclude-standard # Do not search ignored files specified via the .gitignore mechanism - --recurse-submodules # Recursively search in each submodule that is active and checked out in the repository - --text(-a) # Process binary files as if they were text - --textconv # Honor textconv filter settings - --no-textconv # Do not honor textconv filter settings - --ignore-case(-i) # Ignore case differences between the patterns and the files - --recursive(-r) # Descend into levels of directories endlessly - --no-recursive # Do not descend into directories - --word-regexp(-w) # Match the pattern only at word boundary - --invert-match(-v) # Select non-matching lines - --full-name # Forces paths to be output relative to the project top directory - --extended-regexp(-E) # Use POSIX extended regexp for patterns - --basic-regexp(-G) # Use POSIX basic regexp for patterns - --perl-regexp(-P) # Use Perl-compatible regular expressions for patterns - --fixed-strings(-F) # Dont interpret pattern as a regex - --line-number(-n) # Prefix the line number to matching lines - --column # Prefix the 1-indexed byte-offset of the first match from the start of the matching line - --files-with-matches(-l) # Show only the names of files that contain matches - --files-without-match(-L) # Show only the names of files that do not contain matches - --null(-z) # Use \\0 as the delimiter for pathnames in the output, and print them verbatim - --only-matching(-o) # Print only the matched parts of a matching line - --count(-c) # Instead of showing every matched line, show the number of lines that match - --no-color # Turn off match highlighting, even when the configuration file gives the default to color output - --break # Print an empty line between matches from different files - --heading # Show the filename above the matches in that file instead of at the start of each shown line - --show-function(-p) # Show the line that contains the function name of the match, unless the match is a function name itself - --function-context(-W) # Show the surrounding text from the line containing a function name up to the one before the next function name - --and # Combine patterns using and - --or # Combine patterns using or - --not # Combine patterns using not - --all-match # Only match files that can match all the pattern expressions when giving multiple - --quiet(-q) # Just exit with status 0 when there is a match and with non-zero status when there isnt - ...args -] -# Create an empty git repository or reinitialize an existing one -extern "git init" [ - --quiet(-q) # Only print error and warning messages - --bare # Create a bare repository - --force # Remove even with local changes - --all # Remove all submodules - ...args -] -# Show commit shortlog -extern "git shortlog" [ - - ...args -] -# Show commit logs -extern "git log" [ - --dst-prefix # Show the given destination prefix instead of "b/ - --inter-hunk-context # Show the context between diff hunks, up to the specified number of lines - --ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached - --line-prefix # Prepend an additional prefix to every line of output - --no-prefix # Do not show any source or destination prefix - --pickaxe-all # When -S or -G finds a change, show all the changes in that changeset - --pickaxe-regex # Treat the given to -S as an extended POSIX regular expression to match - --relative # Exclude changes outside the directory and show relative pathnames - --src-prefix # Show the given source prefix instead of "a/ - --text(-a) # Treat all files as text - --break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create - --find-copies(-C) # Detect copies as well as renames - --irreversible-delete(-D) # Omit the preimage for deletes - --find-renames(-M) # Detect and report renames - --follow # Continue listing file history beyond renames - --no-decorate # Dont print ref names - --decorate # Print out ref names - --source # Print ref name by which each commit was reached - --use-mailmap - --full-diff - --log-size - --all-match # Limit commits to ones that match all given --grep - --invert-grep # Limit commits to ones with message that dont match --grep - --regexp-ignore-case(-i) # Case insensitive match - --basic-regexp # Patterns are basic regular expressions (default) - --extended-regexp(-E) # Patterns are extended regular expressions - --fixed-strings(-F) # Patterns are fixed strings - --perl-regexp # Patterns are Perl-compatible regular expressions - --remove-empty # Stop when given path disappears from tree - --merges # Print only merge commits - --no-merges # Dont print commits with more than one parent - --no-min-parents # Show only commit without a minimum number of parents - --no-max-parents # Show only commit without a maximum number of parents - --first-parent # Follow only the first parent commit upon seeing a merge commit - --not # Reverse meaning of ^ prefix - --all # Show log for all branches, tags, and remotes - --branches # Show log for all matching branches - --tags # Show log for all matching tags - --remotes # Show log for all matching remotes - --reflog # Show log for all reflogs entries - --ingnore-missing # Ignore invalid object names - --bisect - --stdin # Read commits from stdin - --cherry-mark # Mark equivalent commits with = and inequivalent with + - --cherry-pick # Omit equivalent commits - --left-only - --rigth-only - --cherry - --walk-reflogs(-g) - --merge - --boundary - --simplify-by-decoration - --full-history - --dense - --sparse - --simplify-merges - --ancestry-path - --date-order - --author-date-order - --topo-order - --reverse - --no-walk - --do-walk - --format - --abbrev-commit - --no-abbrev-commit - --oneline - --expand-tabs - --no-expand-tabs - --notes - --no-notes - --show-notes - --standard-notes - --no-standard-notes - --show-signature - --relative-date - --parents - --children - --left-right - --graph - --show-linear-break - --cc - --patch(-p) - --no-patch(-s) - --raw - --patch-with-raw - --indent-heuristic - --no-indent-heuristic - --compaction-heuristic - --no-compaction-heuristic - --minimal - --patience - --histogram - --numstat - --shortstat - --summary - --patch-with-stat - --name-only - --name-status - --color - --no-color - --word-diff - --color-words - --no-renames - --check - --full-index - --binary - --abbrev - --find-copies-harder # Also inspect unmodified files as source for a copy - --ignore-space-at-eol # Ignore changes in whitespace at EOL - --ignore-space-change(-b) # Ignore changes in amount of whitespace - --ignore-all-space(-w) # Ignore whitespace when comparing lines - --ignore-blank-lines # Ignore changes whose lines are all blank - --function-context(-W) # Show whole surrounding functions of changes - --ext-diff # Allow an external diff helper to be executed - --no-ext-diff # Disallow external diff helpers - --no-textconv # Disallow external text conversion filters for binary files (Default) - --textconv # Allow external filters for binary files (Resulting diff is unappliable) - --no-prefix # Do not show source or destination prefix - ...args -] -# Print out ref names -extern "git short\tHide\ prefixes full\tShow\ full\ ref\ names auto\tHide\ prefixes\ if\ printed\ to\ terminal no\tDon\\t\ display\ ref" [ - - ...args -] -# -extern "git sorted unsorted" [ - - ...args -] -# -extern "git always never auto" [ - - ...args -] -# Show information about files in the index and the working tree -extern "git ls-files" [ - --cached(-c) # Show cached files in the output - --deleted(-d) # Show deleted files in the output - --modified(-m) # Show modified files in the output - --others(-o) # Show other (i.e. untracked) files in the output - --ignored(-i) # Show only ignored files in the output - --stage(-s) # Show staged contents' mode bits, object name and stage number in the output - --directory # If a whole directory is classified as "other", show just its name - --no-empty-directory # Do not list empty directories - --unmerged(-u) # Show unmerged files in the output - --killed(-k) # Show files on the filesystem that need to be removed for checkout-index to succeed - --exclude(-x) # Skip untracked files matching pattern - --exclude-from(-X) # Read exclude patterns from ; 1 per line - --exclude-per-directory # Read extra exclude patterns that apply only to the dir and its subdirs in - --exclude-standard # Add the standard Git exclusions - --error-unmatch # If any does not appear in the index, treat this as an error - --with-tree - --full-name # Force paths to be output relative to the project top directory - --recurse-submodules # Recursively calls ls-files on each submodule in the repository - --abbrev # Show only a partial prefix - --debug # After each line that describes a file, add more data about its cache entry - --eol # Show and of files - ...args -] -# Extracts patch and authorship from a single e-mail message -extern "git mailinfo" [ - --message-id(-m) # Copy message id to the end of commit message - --scissors # Remove everything above scissor line - --no-scissors # Ignore scissor lines - ...args -] -# Simple UNIX mbox splitter program -extern "git mailsplit" [ - --keep-cr # Do not remove \\r from lines starting with \\n\\r - --mboxrd # Input is of mboxrd form - ...args -] -# Run tasks to optimize Git repository data -extern "git maintenance" [ - --quiet # Supress logs - --auto # Run maintenance only when necessary - --schedule # Run maintenance on certain intervals - ...args -] -# Initialize Git config vars for maintenance -extern "git register" [ - - ...args -] -# Run one or more maintenance tasks -extern "git run" [ - --dry-run # Report what will be pruned but do not actually prune it - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --dry-run(-n) # Just report what it would remove - --verbose(-v) # Report all removed objects - --progress # Show progress - --dry-run(-n) # Do not remove anything - --verbose(-v) # Report all removals - ...args -] -# Start maintenance -extern "git start" [ - --no-checkout # Do not checkout tree, only update BISECT_HEAD - --first-parent # On merge commits, follow only the first parent commit - ...args -] -# Halt background maintenance -extern "git stop" [ - - ...args -] -# Remove repository from background maintenance -extern "git unregister" [ - - ...args -] -# Join two or more development histories together -extern "git merge" [ - --commit # Autocommit the merge - --no-commit # Don't autocommit the merge - --edit(-e) # Edit auto-generated merge message - --no-edit # Don't edit auto-generated merge message - --ff # Don't generate a merge commit if merge is fast-forward - --no-ff # Generate a merge commit even if merge is fast-forward - --ff-only # Refuse to merge unless fast-forward possible - --gpg-sign(-S) # GPG-sign the merge commit - --log # Populate the log message with one-line descriptions - --no-log # Don't populate the log message with one-line descriptions - --signoff # Add Signed-off-by line at the end of the merge commit message - --no-signoff # Do not add a Signed-off-by line at the end of the merge commit message - --stat # Show diffstat of the merge - --no-stat(-n) # Don't show diffstat of the merge - --squash # Squash changes from other branch as a single commit - --no-squash # Don't squash changes - --verify-signatures # Abort merge if other branch tip commit is not signed with a valid key - --no-verify-signatures # Do not abort merge if other branch tip commit is not signed with a valid key - --quiet(-q) # Be quiet - --verbose(-v) # Be verbose - --progress # Force progress status - --no-progress # Force no progress status - --allow-unrelated-histories # Allow merging even when branches do not share a common history - --rerere-autoupdate # If possible, use previous conflict resolutions - --no-rerere-autoupdate # Do not use previous conflict resolutions - --abort # Abort the current conflict resolution process - --continue # Conclude current conflict resolution process - --all(-a) # Output all merge bases for the commits, instead of just one - --octopus # Compute the best common ancestors of all supplied commits - --independent # Print a minimal subset of the supplied commits with the same ancestors - --is-ancestor # Check if the first commit is an ancestor of the second commit - --fork-point # Find the point at which a branch forked from another branch ref - --tool-help # Print a list of merge tools that may be used with `--tool` - --no-prompt(-y) # Do not prompt before launching a diff tool - --prompt # Prompt before each invocation of the merge resolution program - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --commit # Finalize git notes merge - --abort # Abort git notes merge - ...args -] -# Find as good common ancestors as possible for a merge -extern "git merge-base" [ - --all(-a) # Output all merge bases for the commits, instead of just one - --octopus # Compute the best common ancestors of all supplied commits - --independent # Print a minimal subset of the supplied commits with the same ancestors - --is-ancestor # Check if the first commit is an ancestor of the second commit - --fork-point # Find the point at which a branch forked from another branch ref - ...args -] -# Run merge conflict resolution tools to resolve merge conflicts -extern "git mergetool" [ - --tool-help # Print a list of merge tools that may be used with `--tool` - --no-prompt(-y) # Do not prompt before launching a diff tool - --prompt # Prompt before each invocation of the merge resolution program - ...args -] -# Move or rename a file, a directory, or a symlink -extern "git mv" [ - --force(-f) # Force rename/moving even if target exists - --dry-run(-n) # Only show what would happen - --verbose(-v) # Report names of files as they are changed - ...args -] -# Add or inspect object notes -extern "git notes" [ - --force(-f) # Overwrite existing notes - --allow-empty # Allow empty note - --stdin # Read object names from stdin - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --commit # Finalize git notes merge - --abort # Abort git notes merge - --ignore-missing # Do not throw error on deleting non-existing object note - ...args -] -# List notes for given object -extern "git list" [ - --porcelain # Output in an easy-to-parse format for scripts - ...args -] -# Copy notes from object1 to object2 -extern "git copy" [ - --force(-f) # Overwrite existing notes - --stdin # Read object names from stdin - ...args -] -# Append to the notes of existing object -extern "git append" [ - --allow-empty # Allow empty note - ...args -] -# Edit notes for a given object -extern "git edit" [ - --allow-empty # Allow empty note - ...args -] -# Print current notes ref -extern "git get-ref" [ - - ...args -] -# Fetch from and merge with another repository or a local branch -extern "git pull" [ - --unshallow # Convert a shallow repository to a complete one - --set-upstream # Add upstream (tracking) reference - --quiet(-q) # Be quiet - --verbose(-v) # Be verbose - --all # Fetch all remotes - --append(-a) # Append ref names and object names - --force(-f) # Force update of local branches - --keep(-k) # Keep downloaded pack - --no-tags # Disable automatic tag following - --prune(-p) # Remove remote-tracking references that no longer exist on the remote - --progress # Force progress status - --commit # Autocommit the merge - --no-commit # Don't autocommit the merge - --edit(-e) # Edit auto-generated merge message - --no-edit # Don't edit auto-generated merge message - --ff # Don't generate a merge commit if merge is fast-forward - --no-ff # Generate a merge commit even if merge is fast-forward - --ff-only # Refuse to merge unless fast-forward possible - --gpg-sign(-S) # GPG-sign the merge commit - --log # Populate the log message with one-line descriptions - --no-log # Don't populate the log message with one-line descriptions - --signoff # Add Signed-off-by line at the end of the merge commit message - --no-signoff # Do not add a Signed-off-by line at the end of the merge commit message - --stat # Show diffstat of the merge - --no-stat(-n) # Don't show diffstat of the merge - --squash # Squash changes from upstream branch as a single commit - --no-squash # Don't squash changes - --verify-signatures # Abort merge if upstream branch tip commit is not signed with a valid key - --no-verify-signatures # Do not abort merge if upstream branch tip commit is not signed with a valid key - --allow-unrelated-histories # Allow merging even when branches do not share a common history - --rebase(-r) # Rebase the current branch on top of the upstream branch - --no-rebase # Do not rebase the current branch on top of the upstream branch - --autostash # Before starting rebase, stash local changes, and apply stash when done - --no-autostash # Do not stash local changes before starting rebase - ...args -] -# Compare two commit ranges (e.g. two versions of a branch) -extern "git range-diff" [ - --abbrev # Show only a partial prefix instead of the full 40-byte hexadecimal object name - --binary # Output a binary diff that can be applied with "git-apply - --check # Warn if changes introduce conflict markers or whitespace errors - --color # Show colored diff - --color-moved # Moved lines of code are colored differently - --color-words # Equivalent to --word-diff=color plus --word-diff-regex= - --compact-summary # Output a condensed summary of extended header information - --dst-prefix # Show the given destination prefix instead of "b/ - --ext-diff # Allow an external diff helper to be executed - --find-copies-harder # Inspect unmodified files as candidates for the source of copy - --find-object # Look for differences that change the number of occurrences of the object - --full-index # Show the full pre- and post-image blob object names on the "index" line - --histogram # Generate a diff using the "histogram diff" algorithm - --ignore-blank-lines # Ignore changes whose lines are all blank - --ignore-cr-at-eol # Ignore carrige-return at the end of line when doing a comparison - --ignore-space-at-eol # Ignore changes in whitespace at EOL - --indent-heuristic # Enable the heuristic that shift diff hunk boundaries - --inter-hunk-context # Show the context between diff hunks, up to the specified number of lines - --ita-invisible-in-index # Make the entry appear as a new file in "git diff" and non-existent in "git diff -l cached - --line-prefix # Prepend an additional prefix to every line of output - --minimal # Spend extra time to make sure the smallest possible diff is produced - --name-only # Show only names of changed files - --name-status # Show only names and status of changed files - --no-color # Turn off colored diff - --no-ext-diff # Disallow external diff drivers - --no-indent-heuristic # Disable the indent heuristic - --no-prefix # Do not show any source or destination prefix - --no-renames # Turn off rename detection - --no-textconv # Disallow external text conversion filters to be run when comparing binary files - --numstat # Shows number of added/deleted lines in decimal notation - --patch-with-raw # Synonym for -p --raw - --patch-with-stat # Synonym for -p --stat - --patience # Generate a diff using the "patience diff" algorithm - --pickaxe-all # When -S or -G finds a change, show all the changes in that changeset - --pickaxe-regex # Treat the given to -S as an extended POSIX regular expression to match - --relative # Exclude changes outside the directory and show relative pathnames - --shortstat # Output only the last line of the --stat format containing total number of modified files - --src-prefix # Show the given source prefix instead of "a/ - --stat # Generate a diffstat - --stat # Generate a diffstat - --summary # Output a condensed summary of extended header information - --textconv # Allow external text conversion filters to be run when comparing binary files - --word-diff # Show a word diff - --word-diff-regex # Use to decide what a word is - --text(-a) # Treat all files as text - --break-rewrites(-B) # Break complete rewrite changes into pairs of delete and create - --ignore-space-change(-b) # Ignore changes in amount of whitespace - --find-copies(-C) # Detect copies as well as renames - --irreversible-delete(-D) # Omit the preimage for deletes - --find-renames(-M) # Detect and report renames - --function-context(-W) # Show whole surrounding functions of changes - --ignore-all-space(-w) # Ignore whitespace when comparing lines - --anchored # Generate a diff using the "anchored diff" algorithm - --creation-factor # Percentage by which creation is weighted - --no-dual-color # Use simple diff colors - ...args -] -# Update remote refs along with associated objects -extern "git push" [ - --all # Push all refs under refs/heads/ - --prune # Remove remote branches that don't have a local counterpart - --mirror # Push all refs under refs/ - --delete # Delete all listed refs from the remote repository - --tags # Push all refs under refs/tags - --follow-tags # Push all usual refs plus the ones under refs/tags - --dry-run(-n) # Do everything except actually send the updates - --porcelain # Produce machine-readable output - --force(-f) # Force update of remote refs - --force-with-lease # Force update of remote refs, stopping if others changes would be overwritten - --set-upstream(-u) # Add upstream (tracking) reference - --quiet(-q) # Be quiet - --verbose(-v) # Be verbose - --progress # Force progress status - --patch(-p) # Interactively select hunks - --message(-m) # Add a description - ...args -] -# Force-push branch -extern "git +(__fish_git_branches | string replace -r \t".*" "")" [ - - ...args -] -# Delete remote branch -extern "git :(__fish_git_branch_for_remote | string replace -r \t".*" "")" [ - - ...args -] -# Forward-port local commits to the updated upstream head -extern "git rebase" [ - --continue # Restart the rebasing process - --abort # Abort the rebase operation - --edit-todo # Edit the todo list - --keep-empty # Keep the commits that don't change anything - --skip # Restart the rebasing process by skipping the current patch - --merge(-m) # Use merging strategies to rebase - --quiet(-q) # Be quiet - --verbose(-v) # Be verbose - --stat # Show diffstat of the rebase - --no-stat(-n) # Don't show diffstat of the rebase - --verify # Allow the pre-rebase hook to run - --no-verify # Don't allow the pre-rebase hook to run - --force-rebase(-f) # Force the rebase - --committer-date-is-author-date # Use the author date as the committer date - --ignore-date # Use the committer date as the author date - --interactive(-i) # Interactive mode - --preserve-merges(-p) # Try to recreate merges - --rebase-merges(-r) # Preserve branch structure - --root # Rebase all reachable commits - --autosquash # Automatic squashing - --no-autosquash # No automatic squashing - --autostash # Before starting rebase, stash local changes, and apply stash when done - --no-autostash # Do not stash local changes before starting rebase - --no-ff # No fast-forward - ...args -] -# Preserve branch structure -extern "git rebase-cousins no-rebase-cousins" [ - - ...args -] -# Manage reflog information -extern "git reflog" [ - - ...args -] -# Reset current HEAD to the specified state -extern "git reset" [ - --hard # Reset the index and the working tree - --soft # Reset head without touching the index or the working tree - --mixed # The default: reset the index but not the working tree - ...args -] -# Restore working tree files -extern "git restore" [ - --patch(-p) # Interactive mode - --worktree(-W) # Restore working tree (default) - --staged(-S) # Restore the index - --ours # When restoring files, use stage #2 (ours) - --theirs # When restoring files, use stage #3 (theirs) - --merge(-m) # Recreate the conflicted merge in the unmerged paths when restoring files - --ignore-unmerged # When restoring files, do not abort the operation if there are unmerged entries - --ignore-skip-worktree-bits # Ignore the sparse-checkout file and unconditionally restore any files in - --overlay # Never remove files when restoring - --no-overlay # Remove files when restoring (default) - --quiet(-q) # Suppress messages - --progress # Report progress status to stderr (default) - --no-progress # Do not report progress status to stderr - --conflict=merge # Same as --merge, but specify merge as the conflicting hunk style (default) - --conflict=diff3 # Same as --merge, but specify diff3 as the conflicting hunk style - ...args -] -# Switch to a branch -extern "git switch" [ - --guess # Guess branch name from remote branch (default) - --no-guess # Do not guess branch name from remote branch - --discard-changes(-f) # Proceed even if the index or the working tree differs from HEAD - --merge(-m) # Merge the current branch and contents of the working tree into a new branch - --track(-t) # Track remote branch when creating a new branch - --no-track # Do not track remote branch when creating a new branch - --ignore-other-worktrees # Force check out of the reference - --recurse-submodules # Update the work trees of submodules - --no-recurse-submodules # Do not update the work trees of submodules - --quiet(-q) # Suppress messages - --progress # Report progress status to stderr (default) - --no-progress # Do not report progress status to stderr - --conflict=merge # Same as --merge, but specify merge as the conflicting hunk style (default) - --conflict=diff3 # Same as --merge, but specify diff3 as the conflicting hunk style - ...args -] -# Pick out and massage parameters -extern "git rev-parse" [ - --abbrev-ref # Output non-ambiguous short object names - ...args -] -# Revert an existing commit -extern "git revert" [ - --continue # Continue the operation in progress - --abort # Cancel the operation - --skip # Skip the current commit and continue with the rest of the sequence - --quit # Forget about the current operation in progress - --no-edit # Do not start the commit message editor - --no-commit(-n) # Apply changes to index but dont create a commit - --signoff(-s) # Add a Signed-off-by trailer at the end of the commit message - --rerere-autoupdate # Allow the rerere mechanism to update the index with the result of auto-conflict resolution - --no-rerere-autoupdate # Prevent the rerere mechanism from updating the index with auto-conflict resolution - ...args -] -# Show the working tree status -extern "git status" [ - --short(-s) # Give the output in the short-format - --branch(-b) # Show the branch and tracking info even in short-format - --porcelain # Give the output in a stable, easy-to-parse format - --verbose(-v) # Also show the textual changes that are staged to be committed - --no-ahead-behind # Do not display detailed ahead/behind upstream-branch counts - --renames # Turn on rename detection regardless of user configuration - --no-renames # Turn off rename detection regardless of user configuration - --cached # Use the commit stored in the index - --recursive # Traverse submodules recursively - ...args -] -# Remove unnecessary whitespace -extern "git stripspace" [ - --strip-comments(-s) # Strip all lines starting with comment character - --comment-lines(-c) # Prepend comment character to each line - ...args -] -# Create, list, delete or verify a tag object signed with GPG -extern "git tag" [ - --annotate(-a) # Make an unsigned, annotated tag object - --sign(-s) # Make a GPG-signed tag - --delete(-d) # Remove a tag - --verify(-v) # Verify signature of a tag - --force(-f) # Force overwriting existing tag - --list(-l) # List tags - --contains # List tags that contain a commit - ...args -] -# Manage multiple working trees -extern "git worktree" [ - --force(-f) # Override safeguards - --detach # Detach HEAD in the new working tree - --checkout # Checkout after creating working tree - --no-checkout # Suppress checkout - --guess-remote - --no-guess-remote - --track # Mark as "upstream" from the new branch - --no-track # Dont mark as "upstream" from the new branch - --lock # Lock working tree after creation - --quiet(-q) # Suppress feedback messages - --porcelain # Output in an easy-to-parse format for scripts - --dry-run(-n) # Do not remove anything - --verbose(-v) # Report all removals - ...args -] -# Lock a working tree -extern "git lock" [ - - ...args -] -# Move a working tree to a new location -extern "git move" [ - --stdin # Read object names from stdin - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --ignore-missing # Do not throw error on deleting non-existing object note - --force(-f) # Override safeguards - ...args -] -# Unlock a working tree -extern "git unlock" [ - - ...args -] -# Stash away changes -extern "git stash" [ - --patch(-p) # Interactively select hunks - --message(-m) # Add a description - ...args -] -# Apply and remove a single stashed state -extern "git pop" [ - - ...args -] -# Remove all stashed states -extern "git clear" [ - - ...args -] -# Remove a single stashed state from the stash list -extern "git drop" [ - - ...args -] -# Create a stash -extern "git create" [ - - ...args -] -# Save a new stash -extern "git save" [ - - ...args -] -# Set and read git configuration variables -extern "git config" [ - --global # Get/set global configuration - --system # Get/set system configuration - --local # Get/set local repo configuration - --get # Get config with name - --get-all # Get all values matching key - --replace-all # Replace all matching variables - --unset # Remove a variable - --unset-all # Remove matching variables - --list(-l) # List all variables - --edit(-e) # Open configuration in an editor - --type(-t) # Value is of given type - --bool # Value is true or false - --int # Value is a decimal number - --bool-or-int # Value is --bool or --int - --path # Value is a path - --expiry-date # Value is an expiry date - --null(-z) # Terminate values with NUL byte - --name-only # Show variable names only - --includes # Respect include directives - --show-origin # Show origin of configuration - --default # Use default value when missing entry - ...args -] -# Generate patch series to send upstream -extern "git format-patch" [ - --output-directory(-o) - --no-stat(-p) # Generate plain patches without diffstat - --no-patch(-s) # Suppress diff output - --minimal # Spend more time to create smaller diffs - --patience # Generate diff with the 'patience' algorithm - --histogram # Generate diff with the 'histogram' algorithm - --stdout # Print all commits to stdout in mbox format - --numstat # Show number of added/deleted lines in decimal notation - --shortstat # Output only last line of the stat - --summary # Output a condensed summary of extended header information - --no-renames # Disable rename detection - --full-index # Show full blob object names - --binary # Output a binary diff for use with git apply - --find-copies-harder # Also inspect unmodified files as source for a copy - --text(-a) # Treat all files as text - --ignore-space-at-eol # Ignore changes in whitespace at EOL - --ignore-space-change(-b) # Ignore changes in amount of whitespace - --ignore-all-space(-w) # Ignore whitespace when comparing lines - --ignore-blank-lines # Ignore changes whose lines are all blank - --function-context(-W) # Show whole surrounding functions of changes - --ext-diff # Allow an external diff helper to be executed - --no-ext-diff # Disallow external diff helpers - --no-textconv # Disallow external text conversion filters for binary files (Default) - --textconv # Allow external filters for binary files (Resulting diff is unappliable) - --no-prefix # Do not show source or destination prefix - --numbered(-n) # Name output in [Patch n/m] format, even with a single patch - --no-numbered(-N) # Name output in [Patch] format, even with multiple patches - ...args -] -# Initialize, update or inspect submodules -extern "git submodule" [ - --quiet(-q) # Only print error messages - --init # Initialize all submodules - --checkout # Checkout the superproject's commit on a detached HEAD in the submodule - --merge # Merge the superproject's commit into the current branch of the submodule - --rebase # Rebase current branch onto the superproject's commit - --no-fetch(-N) # Don't fetch new objects from the remote - --remote # Instead of using superproject's SHA-1, use the state of the submodule's remote-tracking branch - --force # Discard local changes when switching to a different commit & always run checkout - --force # Also add ignored submodule path - --force # Remove even with local changes - --all # Remove all submodules - --branch(-b) # Specify the branch to use - --default(-d) # Use default branch of the submodule - --cached # Use the commit stored in the index - --files # Compare the commit in the index with submodule HEAD - --recursive # Traverse submodules recursively - ...args -] -# Unregister the given submodules -extern "git deinit" [ - --force # Remove even with local changes - --all # Remove all submodules - ...args -] -# Show commit summary -extern "git summary" [ - --cached # Use the commit stored in the index - --files # Compare the commit in the index with submodule HEAD - ...args -] -# Run command on each submodule -extern "git foreach" [ - --recursive # Traverse submodules recursively - ...args -] -# Sync submodules URL with .gitmodules -extern "git sync" [ - - ...args -] -# Move submodules git directory to current .git/module directory -extern "git absorbgitdirs" [ - - ...args -] -# Show logs with difference each commit introduces -extern "git whatchanged" [ - - ...args -] -# Remove untracked files from the working tree -extern "git clean" [ - --force(-f) # Force run - --interactive(-i) # Show what would be done and clean files interactively - --dry-run(-n) # Dont actually remove anything, just show what would be done - --quiet(-q) # Be quiet, only report errors - ...args -] -# Show what revision and author last modified each line of a file -extern "git blame" [ - --root # Do not treat root commits as boundaries - --show-stats # Include additional statistics - --reverse # Walk history forward instead of backward - --porcelain(-p) # Show in a format designed for machine consumption - --line-porcelain # Show the porcelain format - --incremental # Show the result incrementally - --show-name(-f) # Show the filename in the original commit - --show-number(-n) # Show the line number in the original commit - --show-email(-e) # Show the author email instead of author name - ...args -] -# Display help information about Git -extern "git help" [ - - ...args -]] - -[# Specify the patch format -extern " mbox mboxrd stgit stgit-series hg" [ - - ...args -] -# -extern "" [ - - ...args -]] \ No newline at end of file diff --git a/custom-completions/auto-generate/completions/nethack.nu b/custom-completions/auto-generate/completions/nethack.nu deleted file mode 100644 index 3b8830495..000000000 --- a/custom-completions/auto-generate/completions/nethack.nu +++ /dev/null @@ -1,6 +0,0 @@ -# Specify a playground directory -extern "nethack" [ - --version # Show version information - --version:paste # Show version information & copy it to paste buffer - ...args -] \ No newline at end of file diff --git a/custom-completions/auto-generate/completions/root.nu b/custom-completions/auto-generate/completions/root.nu deleted file mode 100644 index 24082355a..000000000 --- a/custom-completions/auto-generate/completions/root.nu +++ /dev/null @@ -1,5 +0,0 @@ -# Run in batch mode -extern "root" [ - --help(-\?) # Print help - ...args -] \ No newline at end of file diff --git a/custom-completions/auto-generate/completions/valgrind.nu b/custom-completions/auto-generate/completions/valgrind.nu deleted file mode 100644 index 6d436564e..000000000 --- a/custom-completions/auto-generate/completions/valgrind.nu +++ /dev/null @@ -1,51 +0,0 @@ -[# Skin -extern "" [ - - ...args -] -# Valgrind-ise children -extern " yes no" [ - - ...args -] -# Log to file descriptor -extern " 0 1 2 3 4 5 6 7 8 9" [ - - ...args -] -# Check for memory leaks -extern " no\tDont\ check\ for\ memory\ leaks summary\t'Show a leak summary' full\t'Describe memory leaks in detail'" [ - - ...args -] -# Show reachable leaked memory -extern " yes\t'Show reachable leaked memory' no\t'Do not show reachable leaked memory'" [ - - ...args -] -# Determines how willingly Memcheck considers different backtraces to be the same -extern " low\t'Two entries need to match' med\t'Four entries need to match' high\t'All entries need to match'" [ - - ...args -] -# How to handle loads of words that are partially addressible -extern " yes\t"Do not emit errors on partial loads" no\t"Emit errors on partial loads" [ - - ...args -] -# Check for memory leaks -extern " no\t'Do not check for memory leaks' summary\t'Show a leak summary' full\t'Describe memory leaks in detail'" [ - - ...args -]] - -[# Display help and exit -extern "valgrind" [ - - ...args -] -# -extern "valgrind yes no" [ - - ...args -]] \ No newline at end of file diff --git a/custom-completions/auto-generate/completions/less.nu b/custom-completions/less/less-completions.nu similarity index 90% rename from custom-completions/auto-generate/completions/less.nu rename to custom-completions/less/less-completions.nu index c24bf4c50..bf16357c4 100644 --- a/custom-completions/auto-generate/completions/less.nu +++ b/custom-completions/less/less-completions.nu @@ -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 @@ -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 @@ -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 ] \ No newline at end of file diff --git a/custom-completions/auto-generate/completions/mix.nu b/custom-completions/mix/mix-completions.nu similarity index 90% rename from custom-completions/auto-generate/completions/mix.nu rename to custom-completions/mix/mix-completions.nu index 03235dab0..1f29144eb 100644 --- a/custom-completions/auto-generate/completions/mix.nu +++ b/custom-completions/mix/mix-completions.nu @@ -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 diff --git a/custom-completions/auto-generate/completions/tar.nu b/custom-completions/tar/tar-completions.nu similarity index 98% rename from custom-completions/auto-generate/completions/tar.nu rename to custom-completions/tar/tar-completions.nu index 6f66f98aa..a6acb139d 100644 --- a/custom-completions/auto-generate/completions/tar.nu +++ b/custom-completions/tar/tar-completions.nu @@ -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 diff --git a/custom-completions/auto-generate/completions/tcpdump.nu b/custom-completions/tcpdump/tcpdump-completions.nu similarity index 87% rename from custom-completions/auto-generate/completions/tcpdump.nu rename to custom-completions/tcpdump/tcpdump-completions.nu index 515abd3ad..0e6259036 100644 --- a/custom-completions/auto-generate/completions/tcpdump.nu +++ b/custom-completions/tcpdump/tcpdump-completions.nu @@ -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 diff --git a/custom-completions/auto-generate/completions/virsh.nu b/custom-completions/virsh/virsh-completions.nu similarity index 99% rename from custom-completions/auto-generate/completions/virsh.nu rename to custom-completions/virsh/virsh-completions.nu index 5907d2375..29ef872f6 100644 --- a/custom-completions/auto-generate/completions/virsh.nu +++ b/custom-completions/virsh/virsh-completions.nu @@ -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 diff --git a/custom-completions/auto-generate/completions/zef.nu b/custom-completions/zef/zef-completions.nu similarity index 72% rename from custom-completions/auto-generate/completions/zef.nu rename to custom-completions/zef/zef-completions.nu index 7c5ae506d..4d0a03f86 100644 --- a/custom-completions/auto-generate/completions/zef.nu +++ b/custom-completions/zef/zef-completions.nu @@ -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 @@ -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 @@ -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 ] @@ -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 @@ -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 @@ -108,28 +109,28 @@ 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 ] @@ -137,22 +138,22 @@ extern "zef list" [ # 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 ] @@ -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 @@ -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 diff --git a/modules/base16/base16.nu b/modules/base16/base16.nu index 770b7ff29..e46a97f58 100644 --- a/modules/base16/base16.nu +++ b/modules/base16/base16.nu @@ -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 diff --git a/modules/formats/from-cpuinfo.nu b/modules/formats/from-cpuinfo.nu index dd899a3b3..0de8dc01b 100644 --- a/modules/formats/from-cpuinfo.nu +++ b/modules/formats/from-cpuinfo.nu @@ -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 { diff --git a/modules/formats/from-dmidecode.nu b/modules/formats/from-dmidecode.nu index 80a4fdd87..e2c7d2f23 100644 --- a/modules/formats/from-dmidecode.nu +++ b/modules/formats/from-dmidecode.nu @@ -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 { diff --git a/modules/formats/to-number-format.nu b/modules/formats/to-number-format.nu index 0a6d2b6a6..294d700c7 100644 --- a/modules/formats/to-number-format.nu +++ b/modules/formats/to-number-format.nu @@ -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 diff --git a/modules/to-json-schema/to-json-schema.nu b/modules/to-json-schema/to-json-schema.nu index 55d5f6dd9..e7a3033cd 100644 --- a/modules/to-json-schema/to-json-schema.nu +++ b/modules/to-json-schema/to-json-schema.nu @@ -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 == "" {