From dee0e7efcd9387da8e94f35c38472b9d4e7c225f Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Thu, 21 Nov 2024 20:51:05 -0800 Subject: [PATCH] Fix typos (#982) --- custom-completions/adb/adb-completions.nu | 18 +- custom-completions/bmc/README.md | 2 +- custom-completions/bmc/bmc-completions.nu | 2 +- custom-completions/just/just-completions.nu | 12 +- custom-completions/kw/kw-completions.nu | 46 +- .../tealdeer/tldr-completions.nu | 4 +- make_release/release-note/template.md | 10 +- modules/coloring/256_color_testpattern.nu | 17 +- modules/coloring/nu_index_fg.nu | 6 +- modules/fun/wordle.nu | 10 +- modules/maths/math_functions.nu | 2 +- modules/prompt/full-line.nu | 24 +- modules/prompt/left_and_right_prompt.nu | 4 +- modules/prompt/oh-my-v2.nu | 252 ++-- modules/yadm/mod.nu | 1250 ++++++++--------- stdlib-candidate/std-rfc/bench.nu | 2 +- stdlib-candidate/std-rfc/script-parsing.nu | 2 +- .../std-rfc/tables/reject-column-ranges.nu | 6 +- .../std-rfc/tables/select-ranges.nu | 2 +- 19 files changed, 838 insertions(+), 833 deletions(-) diff --git a/custom-completions/adb/adb-completions.nu b/custom-completions/adb/adb-completions.nu index a928a93..90efe30 100644 --- a/custom-completions/adb/adb-completions.nu +++ b/custom-completions/adb/adb-completions.nu @@ -20,9 +20,9 @@ def "nu-complete adb wait-for-transport" [] { def "nu-complete adb reboot-type" [] { [ - bootloader - recovery - edl + bootloader + recovery + edl sideload # Reboots into recovery and automatically starts sideload mode. sideload-auto-reboot " " @@ -38,7 +38,7 @@ export extern "adb" [ -H: string # name of adb server host [default=localhost] -P: int # port of adb server [default=5037] -L: string # listen on given socket for adb server [default=tcp:localhost:5037] - + --exit-on-write-error # exit if stdout is closed ] @@ -55,7 +55,7 @@ export extern "adb connect" [ # Disconnect from given TCP/IP device [default PORT=5555], or all. export extern "adb disconnect" [ - host_port?: string # Disconnect device via TCP/IP [default PORT=5555] (disconnec all if no ip given). + host_port?: string # Disconnect device via TCP/IP [default PORT=5555] (disconnect all if no ip given). ] # Pair with a device for secure TCP/IP communication. @@ -157,7 +157,7 @@ export extern "adb install-multi-package" [ # Remove specified application from the device export extern "adb uninstall" [ APPLICATION_ID: string # Remove this APPLICATION_ID from the device. - -k + -k ] # Run remote shell command (interactive shell if no command given) @@ -202,7 +202,7 @@ export extern "adb sync" [ ] # Ensure that there is a server running. -export extern "adb start-server" [ # only allowed with 'start-server' or 'server nodaemon', +export extern "adb start-server" [ # only allowed with 'start-server' or 'server nodaemon', --one-device: string@"nu-complete adb one-device-args" #server will only connect to one USB device, specified by a serial number or USB device address. ] @@ -281,7 +281,7 @@ export extern "adb remount" [ # Reboot the device; defaults to booting system image but supports bootloader and recovery too. export extern "adb reboot" [ - type:string@"nu-complete adb reboot-type" + type:string@"nu-complete adb reboot-type" ] # Sideload the given full OTA package @@ -301,4 +301,4 @@ export extern "adb usb" [] # Restart adbd listening on TCP on PORT. export extern "adb tcpip" [ PORT:string -] +] diff --git a/custom-completions/bmc/README.md b/custom-completions/bmc/README.md index c7c4dfb..69224b8 100644 --- a/custom-completions/bmc/README.md +++ b/custom-completions/bmc/README.md @@ -13,7 +13,7 @@ This CLI can: - create a new client action - and rename an existing client action -This `bmc` module particulary adds the completions for the [nushell](nushell.sh/) shell +This `bmc` module particularly adds the completions for the [nushell](nushell.sh/) shell ## How to install diff --git a/custom-completions/bmc/bmc-completions.nu b/custom-completions/bmc/bmc-completions.nu index a06611c..76a11c2 100644 --- a/custom-completions/bmc/bmc-completions.nu +++ b/custom-completions/bmc/bmc-completions.nu @@ -17,7 +17,7 @@ export extern "bmc run" [ --version # Show version number ] -# Import a new bussiness from a token +# Import a new business from a token export extern "bmc import" [ apiToken: string # command --help # Show help diff --git a/custom-completions/just/just-completions.nu b/custom-completions/just/just-completions.nu index 3028532..a3eb33e 100644 --- a/custom-completions/just/just-completions.nu +++ b/custom-completions/just/just-completions.nu @@ -9,8 +9,8 @@ def get-recipes [] { def "nu-complete just" [] { get-recipes - | select recipe doc parameters - | each {|recipe| + | select recipe doc parameters + | each {|recipe| let name = $recipe.recipe mut desc = $recipe.doc | default " " for $p in $recipe.parameters { @@ -33,7 +33,7 @@ def "nu-complete args" [context:string,offset:int] { get-just-arg $name $position } -# Provides argument of recipe $name at position $positions. +# Provides argument of recipe $name at position $positions. def get-just-arg [name:string,position:int] { let recipes = ( get-recipes @@ -46,7 +46,7 @@ def get-just-arg [name:string,position:int] { } else { $recipes | get $position - | each {|recipe| + | each {|recipe| let name = $recipe.name if not ($recipe.default | is-empty) { [[value description]; @@ -63,7 +63,7 @@ def get-just-arg [name:string,position:int] { } } -# Veriables and Assignments are apparently the same thing... +# Variables and Assignments are apparently the same thing... def "nu-complete just assignments" [] { ^just --dump --dump-format json | from json @@ -121,7 +121,7 @@ export extern "just" [ --shell-arg # Invoke shell with as an argument --show(-s):string@"nu-complete just" # Show information about --working-directory(-d) # Use as working directory. --justfile must also be set -] +] def "nu-complete just format" [] { [ "just", "json" ] diff --git a/custom-completions/kw/kw-completions.nu b/custom-completions/kw/kw-completions.nu index b51e8c9..c693456 100644 --- a/custom-completions/kw/kw-completions.nu +++ b/custom-completions/kw/kw-completions.nu @@ -38,9 +38,9 @@ def "nu-complete kw man pages" [] { def "nu-complete kw warnings" [] { [ - [value description]; - ["1" "not too often, may be relevant"] - ["2" "quite often, may still be relevant"] + [value description]; + ["1" "not too often, may be relevant"] + ["2" "quite often, may still be relevant"] ["3" "more obscure, likely ignorable"] ["12" "warns 1 and 2"] ["13" "warns 1 and 3"] @@ -59,9 +59,9 @@ def "nu-complete kw init template" [] { def "nu-complete kw init arch" [] { if ("arch" | path exists) { - ls arch - | where type == "dir" - | get name + ls arch + | where type == "dir" + | get name | each {|el| $el | str replace 'arch/' ''} } else { [] @@ -77,8 +77,8 @@ def "nu-complete kw cores" [] { } def "nu-complete kw configs" [] { - ^kw config -s - | lines + ^kw config -s + | lines | parse --regex '\[.*\] (?[a-z_.]+)=(?.+)$' } @@ -105,7 +105,7 @@ export extern "kw version" [ ...args: string ] -# Initalize kworkflow config file +# Initialize kworkflow config file export extern "kw init" [ --template: string@"nu-complete kw init template" # Uses a template as the kworkflow.config --arch: string@"nu-complete kw init arch" # Sets the variable arch from the newly created kworkflow.config @@ -117,12 +117,12 @@ export extern "kw init" [ # Builds the kernel export extern "kw build" [ - ...flags: string + ...flags: string --info(-i) # Displays build information --menu(-n) # Invokes the kernel menuconfig --doc(-d) # Builds the documentation - --cpu-scaling(-S): int@"nu-complete kw cores" # Sets the number of jobs to use for building the kernel (the -j flag) - --ccache # Enable ccache + --cpu-scaling(-S): int@"nu-complete kw cores" # Sets the number of jobs to use for building the kernel (the -j flag) + --ccache # Enable ccache --warnings(-w): string@"nu-complete kw warnings" # Sets the warning level for the kernel build --save-log-to(-s): string # Saves the build log to a file --llvm # Uses LLVM toolchain during compilation and linking @@ -186,14 +186,14 @@ export alias "kw s" = kw ssh export extern "kw codestyle" [ path?: string # Which files to run checkpatch on. Defaults to the cwd --help(-h) # Shows help page - --verbose # Verbose mode + --verbose # Verbose mode ] export alias "kw c" = kw codestyle export extern "kw self-update" [ --unstable(-u) # Update kw based on the unstable branch - --help(-h) # Shows help page + --help(-h) # Shows help page --verbose # Verbose mode ] @@ -212,9 +212,9 @@ export alias "kw m" = kw maintainers export extern "kw kernel-config-manager" [ --save: string # Creates a snapshot of the .config file with the given name -d: string # Sets the description when using --save - --force(-f) # Supress warnings + --force(-f) # Suppress warnings --get: string # Gets the config with the given name and overwrites the current .config file - --remove(-r): string # Removes the config with the given name + --remove(-r): string # Removes the config with the given name --list(-l) # Lists all the configs being managed --fetch # Fetches a .config from a target machine --output(-o): string # Sets the output file when using --fetch @@ -256,7 +256,7 @@ export extern "kw explore" [ expr?: string # Expression to search for --log(-l) # Search using git log with the given string --grep(-g) # Search using grep with the given string - --all(-a) # Search using git grep with the given string + --all(-a) # Search using git grep with the given string --only-source(-c) # Show only results from source code --only-header(-H) # Show only results from header -p: string # Path to where to start the search @@ -272,7 +272,7 @@ export extern "kw pomodoro" [ --tag(-g): string # Tag the pomodoro --description(-d): string # Describe the pomodoro task --check-timer(-c) # Check the current timer - --show-tags(-s) # Show all tags used in pomodoros + --show-tags(-s) # Show all tags used in pomodoros --help(-h) # Shows help page --verbose # Verbose mode ] @@ -284,7 +284,7 @@ export extern "kw report" [ --year: string="" # Shows the report for the current year if not specified --month: string="" # Shows the report for the current month if not specified / --week: string="" # Shows the report for the current week if not specified / - --day: string="" # Shows the report for the current day if not specified // + --day: string="" # Shows the report for the current day if not specified // --all # Shows all the data in the report --statistics(-s) # Shows the statistics of the report --pomodoro # Shows the pomodoro data in the report @@ -304,7 +304,7 @@ export extern "kw device" [ ] # kernel debug -export extern "kw debug" [ +export extern "kw debug" [ --dmesg(-g) # Collect dmesg log. --event(-e): string="" # Enable specific events to be traced. If no event is specified, all events will be enabled. --ftrace(-t) # Enable ftrace. @@ -368,7 +368,7 @@ export extern "kw clear-cache" [] # drm subsystem support export extern "kw drm" [ - --local # Show all DRM drivers available in the local machine. + --local # Show all DRM drivers available in the local machine. --remote: string # Specify the target device for the drm action, can be a remote or local machine. --load-module: string # Allow user to specify one or more modules to load with or without parameters. --unload-module: string # Allow users to unload one or more DRM drivers. @@ -388,8 +388,8 @@ export extern "kw vm" [ --alert: string@"nu-complete kw deploy alert" # set alert behaviour upon command completion ] - + # Show kw man page export extern "kw help" [] -export alias "kw h" = kw help +export alias "kw h" = kw help diff --git a/custom-completions/tealdeer/tldr-completions.nu b/custom-completions/tealdeer/tldr-completions.nu index ea259d4..978ec1c 100644 --- a/custom-completions/tealdeer/tldr-completions.nu +++ b/custom-completions/tealdeer/tldr-completions.nu @@ -1,6 +1,6 @@ # authour: DWTW -def platformOveride [] { +def platformOverride [] { [ "linux", "macos", "windows", "sunos", "osx", "android" ] } @@ -13,7 +13,7 @@ export extern "tldr" [ string? --list(-l) # Lists all commands in the cache --render(-f): string # Render a specific markdown file - --platform(-f): string@platformOveride # Override the operating system + --platform(-f): string@platformOverride # Override the operating system --language(-L): string # Override the language --update(-u) # Update the local cache --no-auto-update # If auto update is configured. disable it for this run diff --git a/make_release/release-note/template.md b/make_release/release-note/template.md index 77d977c..dca659d 100644 --- a/make_release/release-note/template.md +++ b/make_release/release-note/template.md @@ -5,6 +5,7 @@ author_site: https://twitter.com/nu_shell author_image: https://www.nushell.sh/blog/images/nu_logo.png excerpt: Today, we're releasing version {{VERSION}} of Nu. This release adds... --- + @@ -12,6 +13,7 @@ excerpt: Today, we're releasing version {{VERSION}} of Nu. This release adds... # Nushell {{VERSION}} + Today, we're releasing version {{VERSION}} of Nu. This release adds... # Where to get it @@ -58,9 +60,9 @@ As part of this release, we also publish a set of optional plugins you can insta Thanks to all the contributors below for helping us solve issues, improve documentation, refactor code, and more! :pray: -| author | title | link | -| ------------------------------------ | ----------- | ------------------------------------------------------- | -| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) | +| author | title | link | +| ------------------------------------ | ----- | ------------------------------------------------------- | +| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) | # Full changelog @@ -69,7 +71,7 @@ Thanks to all the contributors below for helping us solve issues, improve docume - run `list-prs --milestone v{{VERSION}} | pr-table` - paste the output here -Afterwards, go through each PR and clasify it as one of the following: +Afterwards, go through each PR and classify it as one of the following: - A user-facing change. These PRs should go into the `# Changes` section. - A plugin-facing change. These PRs should go in `# Notes for plugin developers`. Some plugin-facing changes might also be a user-facing change and vice versa. - A documentation improvement, error message improvement, refactoring PR, clippy fix, typo fix, etc. These PRs go into the `# Hall of fame`. You can just copy the table row in this section and paste it to the `# Hall of fame` section above. Note that major refactorings may warrant a section in `# Highlights`. diff --git a/modules/coloring/256_color_testpattern.nu b/modules/coloring/256_color_testpattern.nu index 3c70779..02a5d45 100644 --- a/modules/coloring/256_color_testpattern.nu +++ b/modules/coloring/256_color_testpattern.nu @@ -38,7 +38,7 @@ def print_colour [ colour:int ] { $bg_color + $fg_color + $text + " " } -let printable_colours = 256 +const printable_colours = 256 def print_run [start:int, amount:int] { $start..<($start + $amount) | each { |i| @@ -62,12 +62,13 @@ def print_blocks [start:int, end:int, block_cols:int, block_rows:int, blocks_per } | str join } -print (print_run 0 16) # The first 16 colours are spread over the whole spectrum -print "" # Single line -print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive -print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive -print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey - +export def main [] { + print (print_run 0 16) # The first 16 colours are spread over the whole spectrum + print "" # Single line + print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive + print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive + print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey +} # bash: @@ -113,7 +114,7 @@ print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey # # # Uncomment the below for more precise luminance calculations # -# # # Calculate percieved brightness +# # # Calculate perceived brightness # # # See https://www.w3.org/TR/AERT#color-contrast # # # and http://www.itu.int/rec/R-REC-BT.601 # # # Luminance is in range 0..5000 as each value is 0..5 diff --git a/modules/coloring/nu_index_fg.nu b/modules/coloring/nu_index_fg.nu index 01022be..b6b0f16 100644 --- a/modules/coloring/nu_index_fg.nu +++ b/modules/coloring/nu_index_fg.nu @@ -1,5 +1,5 @@ # this script uses foreground ansi index colors to print -# a table of 16 rows by 16 colums where each item is a +# a table of 16 rows by 16 columns where each item is a # different color def show_index_colors [] { let prefix = "38;5;" @@ -24,4 +24,6 @@ def one_liner [] { } -show_index_colors +export def main [] { + show_index_colors +} diff --git a/modules/fun/wordle.nu b/modules/fun/wordle.nu index f5e5412..46c7036 100644 --- a/modules/fun/wordle.nu +++ b/modules/fun/wordle.nu @@ -1,7 +1,7 @@ -# A Terminal Wordle game. +# A Terminal Wordle game. # The code is based on https://gist.github.com/huytd/6a1a6a7b34a0d0abcac00b47e3d01513 ,but slightly personalized. -# a simple termninal Wordle game! +# a simple terminal Wordle game! export def main [ --unlimited(-u) # Play the game in unlimited mode. --max_count(-M) : int = 6 # Give yourself more chances than default @@ -23,7 +23,7 @@ export def main [ if (((($words | where column1 =~ $guess) | length) >= 1) and ($guess | str length) == 5) { mut out = "" mut checked = $word - for i in ($guess | split chars) -n { + for i in ($guess | split chars | enumerate) { if ($i.item == ($word | str substring ($i.index)..($i.index + 1)) ) { $out += $"(ansi green_reverse)($i.item)(ansi reset)" $avail = ($avail | str replace $i.item $"(ansi green_reverse)($i.item)(ansi white_reverse)") @@ -46,10 +46,10 @@ export def main [ } else { echo "please enter a valid [5 letter] word!" $guess_count -= 1 - } + } } else { echo $"(ansi yellow )You loose, the word was: (ansi red)($word)(ansi reset)" $end = true } } -} \ No newline at end of file +} diff --git a/modules/maths/math_functions.nu b/modules/maths/math_functions.nu index 4b3bd60..26e881d 100644 --- a/modules/maths/math_functions.nu +++ b/modules/maths/math_functions.nu @@ -211,7 +211,7 @@ export def "cartesian product" [ def cartesian_product [] { use std assert - # emptyness + # emptiness assert equal (cartesian product [] []) [] assert equal (cartesian product []) [] assert equal (cartesian product) [] diff --git a/modules/prompt/full-line.nu b/modules/prompt/full-line.nu index aa75d2b..41b7ff4 100644 --- a/modules/prompt/full-line.nu +++ b/modules/prompt/full-line.nu @@ -1,15 +1,15 @@ -# Build a full-line prompt with widgets for: +# Build a full-line prompt with widgets for: # activated python virtual environment (from `overlay use /bin/activate.nu`) # current working directory -# git status (branch, branch ahead/behind remote, files changed) +# git status (branch, branch ahead/behind remote, files changed) # current position in remembered working directories (`std dirs`, a.k.a. `shells`) # also, as a nu dev special, widget for active nu executable (flags `cargo run` vs "installed" and which branch built from). -# +# # to use: # 1. copy this file to `($nu.default-config-dir | path add 'scripts')` (Or someplace on your $env.NU_LIB_DIRS path, defined in env.nu) -# 2. cut `$env.PROMPT_COMMAND` and `PROMPT_OMMAND_RIGHT' from your env.nu. +# 2. cut `$env.PROMPT_COMMAND` and `PROMPT_OMMAND_RIGHT' from your env.nu. # These will depend on `use full-line`, which can not be done in env.nu. -# You can leave the `PROMPT-*INDICATOR*` statements in env.nu or +# You can leave the `PROMPT-*INDICATOR*` statements in env.nu or # consolidate all prompt stuff in config.nu. # 3. Add new prompt setup stuff somewhere in config.nu: # ``` @@ -18,7 +18,7 @@ # $env.PROMPT_COMMAND_RIGHT = "" # ``` # -# credit panache-git for the git status widget. +# credit panache-git for the git status widget. use std dirs use std assert @@ -40,14 +40,14 @@ export def main [ let mid_content = ($" (dir_string) ") let mid_content_len = ($mid_content | ansi strip | str length -g) - - let dirs_segment = $" |(dirs show | each {|it| if $it.active {'V'} else {'.'}} | str join '')|" + + let dirs_segment = $" |(dirs | each {|it| if $it.active {'V'} else {'.'}} | str join '')|" let right_content = ($"(repo-styled)($pad_char + $pad_char + $pad_char)($dirs_segment)") let right_content_len = ($right_content | ansi strip | str length -g) let term_width = ((term size) | get columns) let mid_padding = ($term_width - $left_content_len - $right_content_len) - + [(ansi reset), $left_content, ($mid_content | fill --character $pad_char --width $mid_padding --alignment center), @@ -58,7 +58,7 @@ export def main [ # build current exe widget def current_exe [] { - let content = ([ + let content = ([ ($nu.current-exe | path dirname | path basename | str replace "bin" ""), (version | get branch | str replace "main" ""), ] | str join " " | str trim) @@ -70,7 +70,7 @@ def current_exe [] { } # build current working directory segment -## don't get sucked into the path syntax wars: simply color portions of path to flag priviliged vs normal user mode. +## don't get sucked into the path syntax wars: simply color portions of path to flag privileged vs normal user mode. def dir_string [] { let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold }) @@ -78,7 +78,7 @@ def dir_string [] { $"($path_color)($env.PWD)(ansi reset)" | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)" } -# Following code cheerfully ~~stolen~~ adapted from: +# Following code cheerfully ~~stolen~~ adapted from: # https://github.com/nushell/nu_scripts/blob/ab0d3aaad015ca8ac2c2004d728cc8bac32cda1b/modules/prompt/panache-git.nu # Get repository status as structured data diff --git a/modules/prompt/left_and_right_prompt.nu b/modules/prompt/left_and_right_prompt.nu index aeab6c3..0918871 100644 --- a/modules/prompt/left_and_right_prompt.nu +++ b/modules/prompt/left_and_right_prompt.nu @@ -20,7 +20,7 @@ export def construct_prompt [] { # get the terminal width let term_width = (term size).columns - # get the curren time + # get the current time let current_time = (date now | format date '%I:%M:%S%.3f %p') # let's construct the left and right prompt @@ -33,7 +33,7 @@ export def construct_prompt [] { # the right side of the prompt with ansi colors let right_colored = $"(ansi blue)($env.CMD_DURATION_MS)|(ansi dark_gray)($current_time)(ansi reset)" - # let's calcuate the length of the right prompt so we know how much to pad the left prompt + # let's calculate the length of the right prompt so we know how much to pad the left prompt let calculated_right_len = ($term_width - $left_len) # finally, let's make the prompt let the_prompt = $"($left_colored)($right_colored | fill -a r -c ' ' -w $calculated_right_len)(char newline)($decorator) " diff --git a/modules/prompt/oh-my-v2.nu b/modules/prompt/oh-my-v2.nu index ceb4245..24d5889 100644 --- a/modules/prompt/oh-my-v2.nu +++ b/modules/prompt/oh-my-v2.nu @@ -2,168 +2,168 @@ # modes # * 8bit # * 24bit -let color_mode = "8bit" +const color_mode = "8bit" # setup separate characters -let left_prompt_separator_diff_color = (char -u 'e0b0') -let left_prompt_separator_same_color = (char -u 'e0b1') -let right_prompt_separator_diff_color = (char -u 'e0b2') -let right_prompt_separator_same_color = (char -u 'e0b3') +const left_prompt_separator_diff_color = (char -u 'e0b0') +const left_prompt_separator_same_color = (char -u 'e0b1') +const right_prompt_separator_diff_color = (char -u 'e0b2') +const right_prompt_separator_same_color = (char -u 'e0b3') # setup color variables for 24bit and 8bit # prompt -let prompt_color_frame_and_connection_24 = (ansi -e { fg: "#6C6C6C" }) -let prompt_color_separator_same_color_24 = (ansi -e { fg: "#949494" }) -let prompt_color_frame_and_connection_8 = $"(ansi idx_fg)242m" -let prompt_color_separator_same_color_8 = $"(ansi idx_fg)246m" -let prompt_add_new_line_before = false -let prompt_color_frame_and_connection = "" -let prompt_color_separator_same_color = "" +const prompt_color_frame_and_connection_24 = (ansi -e { fg: "#6C6C6C" }) +const prompt_color_separator_same_color_24 = (ansi -e { fg: "#949494" }) +const prompt_color_frame_and_connection_8 = $"(ansi idx_fg)242m" +const prompt_color_separator_same_color_8 = $"(ansi idx_fg)246m" +const prompt_add_new_line_before = false +const prompt_color_frame_and_connection = "" +const prompt_color_separator_same_color = "" -let left_separator_diff_color = "" -let left_separator_same_color = "" -let left_items = [] -let left_prefix = "" -let left_suffix = "" +const left_separator_diff_color = "" +const left_separator_same_color = "" +const left_items = [] +const left_prefix = "" +const left_suffix = "" -let right_separator_diff_color = "" -let right_separator_same_color = "" -let right_items = [] -let right_prefix = "" -let right_suffix = "" +const right_separator_diff_color = "" +const right_separator_same_color = "" +const right_items = [] +const right_prefix = "" +const right_suffix = "" # cmd -let cmd_duration_bg_color_24 = (ansi -e { bg: "#C4A000" }) -let cmd_duration_color_24 = (ansi -e { fg: "#000000" }) -let cmd_duration_bg_color_8 = $"(ansi idx_bg)178m" -let cmd_duration_color_8 = $"(ansi idx_fg)16m" -let cmd_bg_color = "" -let cmd_color = "" -let cmd_decimals = 2 -let cmd_icon = "" +const cmd_duration_bg_color_24 = (ansi -e { bg: "#C4A000" }) +const cmd_duration_color_24 = (ansi -e { fg: "#000000" }) +const cmd_duration_bg_color_8 = $"(ansi idx_bg)178m" +const cmd_duration_color_8 = $"(ansi idx_fg)16m" +const cmd_bg_color = "" +const cmd_color = "" +const cmd_decimals = 2 +const cmd_icon = "" # git -let git_bg_color_24 = (ansi -e { bg: "#4E9A06" }) -let git_bg_color_unstable_24 = (ansi -e { bg: "#C4A000" }) -let git_bg_color_urgent_24 = (ansi -e { bg: "#CC0000" }) -let git_color_branch_24 = (ansi -e { fg: "#000000" }) -let git_color_conflicted_24 = (ansi -e { fg: "#000000" }) -let git_color_dirty_24 = (ansi -e { fg: "#000000" }) -let git_color_operation_24 = (ansi -e { fg: "#000000" }) -let git_color_staged_24 = (ansi -e { fg: "#000000" }) -let git_color_stash_24 = (ansi -e { fg: "#000000" }) -let git_color_untracked_24 = (ansi -e { fg: "#000000" }) -let git_color_upstream_24 = (ansi -e { fg: "#000000" }) +const git_bg_color_24 = (ansi -e { bg: "#4E9A06" }) +const git_bg_color_unstable_24 = (ansi -e { bg: "#C4A000" }) +const git_bg_color_urgent_24 = (ansi -e { bg: "#CC0000" }) +const git_color_branch_24 = (ansi -e { fg: "#000000" }) +const git_color_conflicted_24 = (ansi -e { fg: "#000000" }) +const git_color_dirty_24 = (ansi -e { fg: "#000000" }) +const git_color_operation_24 = (ansi -e { fg: "#000000" }) +const git_color_staged_24 = (ansi -e { fg: "#000000" }) +const git_color_stash_24 = (ansi -e { fg: "#000000" }) +const git_color_untracked_24 = (ansi -e { fg: "#000000" }) +const git_color_upstream_24 = (ansi -e { fg: "#000000" }) -let git_bg_color_8 = $"(ansi idx_bg)70m" -let git_bg_color_unstable_8 = $"(ansi idx_bg)178m" -let git_bg_color_urgent_8 = $"(ansi idx_bg)160m" -let git_color_branch_8 = $"(ansi idx_fg)16m" -let git_color_conflicted_8 = $"(ansi idx_fg)16m" -let git_color_dirty_8 = $"(ansi idx_fg)16m" -let git_color_operation_8 = $"(ansi idx_fg)16m" -let git_color_staged_8 = $"(ansi idx_fg)16m" -let git_color_stash_8 = $"(ansi idx_fg)16m" -let git_color_untracked_8 = $"(ansi idx_fg)16m" -let git_color_upstream_8 = $"(ansi idx_fg)16m" +const git_bg_color_8 = $"(ansi idx_bg)70m" +const git_bg_color_unstable_8 = $"(ansi idx_bg)178m" +const git_bg_color_urgent_8 = $"(ansi idx_bg)160m" +const git_color_branch_8 = $"(ansi idx_fg)16m" +const git_color_conflicted_8 = $"(ansi idx_fg)16m" +const git_color_dirty_8 = $"(ansi idx_fg)16m" +const git_color_operation_8 = $"(ansi idx_fg)16m" +const git_color_staged_8 = $"(ansi idx_fg)16m" +const git_color_stash_8 = $"(ansi idx_fg)16m" +const git_color_untracked_8 = $"(ansi idx_fg)16m" +const git_color_upstream_8 = $"(ansi idx_fg)16m" -let git_bg_color = "" -let git_bg_color_unstable = "" -let git_bg_color_urgent = "" -let git_color_branch = "" -let git_color_conflicted = "" -let git_color_dirty = "" -let git_color_operation = "" -let git_color_staged = "" -let git_color_stash = "" -let git_color_untracked = "" -let git_color_upstream = "" +const git_bg_color = "" +const git_bg_color_unstable = "" +const git_bg_color_urgent = "" +const git_color_branch = "" +const git_color_conflicted = "" +const git_color_dirty = "" +const git_color_operation = "" +const git_color_staged = "" +const git_color_stash = "" +const git_color_untracked = "" +const git_color_upstream = "" # os -let os_bg_color_24 = (ansi -e { bg: "#CED7CF" }) -let os_color_24 = (ansi -e { fg: "#080808" }) -let os_bg_color_8 = $"(ansi idx_bg)188m" -let os_color_8 = $"(ansi idx_fg)232m" -let os_bg_color = "" -let os_color = "" +const os_bg_color_24 = (ansi -e { bg: "#CED7CF" }) +const os_color_24 = (ansi -e { fg: "#080808" }) +const os_bg_color_8 = $"(ansi idx_bg)188m" +const os_color_8 = $"(ansi idx_fg)232m" +const os_bg_color = "" +const os_color = "" # pwd -let pwd_bg_color_24 = (ansi -e { bg: "#3465A4" }) -let pwd_color_anchors_24 = (ansi -e { fg: "#E4E4E4" }) -let pwd_color_dirs_24 = (ansi -e { fg: "#E4E4E4" }) -let pwd_color_truncated_dirs_24 = (ansi -e { fg: "#BCBCBC" }) +const pwd_bg_color_24 = (ansi -e { bg: "#3465A4" }) +const pwd_color_anchors_24 = (ansi -e { fg: "#E4E4E4" }) +const pwd_color_dirs_24 = (ansi -e { fg: "#E4E4E4" }) +const pwd_color_truncated_dirs_24 = (ansi -e { fg: "#BCBCBC" }) -let pwd_bg_color_8 = $"(ansi idx_bg)61m" -let pwd_color_anchors_8 = $"(ansi idx_fg)254m" -let pwd_color_dirs_8 = $"(ansi idx_fg)254m" -let pwd_color_truncated_dirs_8 = $"(ansi idx_fg)250m" +const pwd_bg_color_8 = $"(ansi idx_bg)61m" +const pwd_color_anchors_8 = $"(ansi idx_fg)254m" +const pwd_color_dirs_8 = $"(ansi idx_fg)254m" +const pwd_color_truncated_dirs_8 = $"(ansi idx_fg)250m" -let pwd_bg_color = "" -let pwd_color_anchors = "" -let pwd_color_dirs = "" -let pwd_color_truncated_dirs = "" -let pwd_icon = "" -let pwd_icon_home = "" -let pwd_icon_unwritable = "" -let pwd_markers = [] +const pwd_bg_color = "" +const pwd_color_anchors = "" +const pwd_color_dirs = "" +const pwd_color_truncated_dirs = "" +const pwd_icon = "" +const pwd_icon_home = "" +const pwd_icon_unwritable = "" +const pwd_markers = [] # rustc -let rustc_bg_color_24 = (ansi -e { bg: "#F74C00" }) -let rustc_color_24 = (ansi -e { fg: "#000000" }) -let rustc_bg_color_8 = $"(ansi idx_bg)202m" -let rustc_color_8 = $"(ansi idx_fg)16m" +const rustc_bg_color_24 = (ansi -e { bg: "#F74C00" }) +const rustc_color_24 = (ansi -e { fg: "#000000" }) +const rustc_bg_color_8 = $"(ansi idx_bg)202m" +const rustc_color_8 = $"(ansi idx_fg)16m" -let rustc_bg_color = "" -let rustc_color = "" -let rustc_icon = "" +const rustc_bg_color = "" +const rustc_color = "" +const rustc_icon = "" # status -let status_bg_color_24 = (ansi -e { bg: "#2E3436" }) -let status_bg_color_failure_24 = (ansi -e { bg: "#CC0000" }) -let status_color_24 = (ansi -e { fg: "#4E9A06" }) -let status_color_failure_24 = (ansi -e { fg: "#FFFF00" }) +const status_bg_color_24 = (ansi -e { bg: "#2E3436" }) +const status_bg_color_failure_24 = (ansi -e { bg: "#CC0000" }) +const status_color_24 = (ansi -e { fg: "#4E9A06" }) +const status_color_failure_24 = (ansi -e { fg: "#FFFF00" }) -let status_bg_color_8 = $"(ansi idx_bg)236m" -let status_bg_color_failure_8 = $"(ansi idx_bg)160m" -let status_color_8 = $"(ansi idx_fg)70m" -let status_color_failure_8 = $"(ansi idx_fg)226m" +const status_bg_color_8 = $"(ansi idx_bg)236m" +const status_bg_color_failure_8 = $"(ansi idx_bg)160m" +const status_color_8 = $"(ansi idx_fg)70m" +const status_color_failure_8 = $"(ansi idx_fg)226m" -let status_bg_color = "" -let status_bg_color_faiure = "" -let status_color = "" -let status_color_failure = "" -let status_icon = "" -let status_icon_failure = "" +const status_bg_color = "" +const status_bg_color_failure = "" +const status_color = "" +const status_color_failure = "" +const status_icon = "" +const status_icon_failure = "" # time -let time_bg_color_24 = (ansi -e { bg: "#D3D7CF" }) -let time_color_24 = (ansi -e { fg: "#000000" }) -let time_bg_color_8 = $"(ansi idx_bg)188m" -let time_color_8 = $"(ansi idx_fg)16m" +const time_bg_color_24 = (ansi -e { bg: "#D3D7CF" }) +const time_color_24 = (ansi -e { fg: "#000000" }) +const time_bg_color_8 = $"(ansi idx_bg)188m" +const time_color_8 = $"(ansi idx_fg)16m" -let time_bg_color = "" -let time_color = "" -let time_format = "" +const time_bg_color = "" +const time_color = "" +const time_format = "" # indicator -let indicator_color_24 = (ansi -e { fg: "#3465a4" }) -let indicator_bg_color_24 = (ansi -e { bg: "#000000" }) -let indicator_color_8 = $"(ansi idx_fg)61m" -let indicator_bg_color_8 = $"(ansi idx_bg)16m" +const indicator_color_24 = (ansi -e { fg: "#3465a4" }) +const indicator_bg_color_24 = (ansi -e { bg: "#000000" }) +const indicator_color_8 = $"(ansi idx_fg)61m" +const indicator_bg_color_8 = $"(ansi idx_bg)16m" # terminal background color -let terminal_color_24 = (ansi -e { fg: "#c7c7c7" }) -let terminal_color_8 = (ansi white) -let terminal_bg_color_24 = (ansi -e { bg: "#000000" }) -let terminal_bg_color_8 = (ansi black) +const terminal_color_24 = (ansi -e { fg: "#c7c7c7" }) +const terminal_color_8 = (ansi white) +const terminal_bg_color_24 = (ansi -e { bg: "#000000" }) +const terminal_bg_color_8 = (ansi black) # cmd_duration_ms -let cmd_duration_ms_color_24 = (ansi -e { fg: "#606060" }) -let cmd_duration_ms_color_8 = $"(ansi idx_fg)244m" -let cmd_duration_ms_bg_color_24 = (ansi -e { fg: "#000000" }) -let cmd_duration_ms_bg_color_8 = (ansi black) +const cmd_duration_ms_color_24 = (ansi -e { fg: "#606060" }) +const cmd_duration_ms_color_8 = $"(ansi idx_fg)244m" +const cmd_duration_ms_bg_color_24 = (ansi -e { fg: "#000000" }) +const cmd_duration_ms_bg_color_8 = (ansi black) -let runtime_colors = [ +const runtime_colors = [ { name: prompt_color_frame_and_connection, '8bit': $prompt_color_frame_and_connection_8, '24bit': $prompt_color_frame_and_connection_24 }, { name: prompt_color_separator_same_color, '8bit': $prompt_color_separator_same_color_8, '24bit': $prompt_color_separator_same_color_24 }, { name: left_separator_diff_color, '8bit': $left_prompt_separator_diff_color, '24bit': $left_prompt_separator_diff_color }, diff --git a/modules/yadm/mod.nu b/modules/yadm/mod.nu index 90c40a2..deabf4e 100755 --- a/modules/yadm/mod.nu +++ b/modules/yadm/mod.nu @@ -3,17 +3,17 @@ def generate_viable_bash_string_flags [ -flag_record:record # A object filled all known flags and their values. +flag_record:record # A object filled all known flags and their values. ] -> list { const acceptable_bash_types = [string int float duration filesize binary bool] - let not_all_flag_record_values_are_acceptable_bash_types = $flag_record - | values + let not_all_flag_record_values_are_acceptable_bash_types = $flag_record + | values | all { |value| ($value | describe) not-in $acceptable_bash_types } - + # Since bash can only accept strings and string-like values the user must type them. if $not_all_flag_record_values_are_acceptable_bash_types { @@ -25,7 +25,7 @@ flag_record:record # A object filled all known flags and their values. label: { text: $"The values for these flags aren't good please use. These ($joined_acceptable_bash_types) types. - Bash can't use any of these types at all. + Bash can't use any of these types at all. " span: (metadata $flag_record).span } @@ -37,31 +37,31 @@ flag_record:record # A object filled all known flags and their values. - $flag_record - | items { |key value| - + $flag_record + | items { |key value| + let value_type = ( $value | describe ) - + let viable_types = [string int float duration filesize binary] - - # If flag value is a non-bool primitive create --key=value flag. - if $value_type in $viable_types { + + # If flag value is a non-bool primitive create --key=value flag. + if $value_type in $viable_types { return $"--($key)=($value)" - } - - # If flag value is a nothing return null + } + + # If flag value is a nothing return null if $value_type == nothing or $value == false { return null } - - # If flag value is a bool primitive create --key flag. + + # If flag value is a bool primitive create --key flag. $"--($key)" - - + + } - | filter { |value| ( $value | describe ) != nothing } - + | filter { |value| ( $value | describe ) != nothing } + } @@ -69,8 +69,8 @@ alias bash_yadm = bash yadm export def init [ --initial-branch(-b) - --f - --w + --f + --w ] { bash_yadm init ...( @@ -85,21 +85,21 @@ export def init [ export def main [ - --yadm-dir(-Y) + --yadm-dir(-Y) - --yadm-data + --yadm-data - --yadm-repo + --yadm-repo - --yadm-config + --yadm-config - --yadm-encrypt + --yadm-encrypt - --yadm-archive + --yadm-archive - --yadm-bootstrap + --yadm-bootstrap ] { - + bash_yadm ...( generate_viable_bash_string_flags { yadm-dir:$yadm_dir, @@ -111,7 +111,7 @@ export def main [ yadm-bootstrap:$yadm_bootstrap, } ) - + } @@ -127,17 +127,17 @@ def generate_type_flag_completions [] { } - + export def clone [ url:string - -f + -f --no-bootstrap --bootstrap -w:string --branch(-b):string ] { - - + + bash_yadm clone $url ...( generate_viable_bash_string_flags { f:$f @@ -147,67 +147,67 @@ def generate_type_flag_completions [] { branch:$branch } ) - - + + } - + export module config { - + const yadm_config_characteristics = { yadm:{ - alt-copy: { + alt-copy: { type: bool description: "Make alternate files copies instead of symbolic links" } - auto-alt: { + auto-alt: { type: bool description: "Disable the automatic linking" } - auto-exclude: { + auto-exclude: { type: bool description: "Disable the automatic exclusion of patterns defined in the encryption file" } - auto-perms: { + auto-perms: { type: bool description: "Disable the automatic permission changes" } - auto-private-dirs: { + auto-private-dirs: { type: bool description: "Disable the automatic creating of private directories" } - cipher: { + cipher: { type: ['gpg', 'openssl'] description: "Configure which encryption system is used by the encrypt/decrypt command" } - git-program: { + git-program: { type:string - description: "Specify an alternate program to use instead of git" + description: "Specify an alternate program to use instead of git" } - gpg-perms: { + gpg-perms: { type: bool description: "Disable the permission changes to the gnupg folder" } - gpg-program: { + gpg-program: { type: string description: "Specify an alternate program to use instead of gpg" } - gpg-recipient: { + gpg-recipient: { type:string description:"Specify which cipher should be used by openssl" } - openssl-ciphername: { + openssl-ciphername: { type:string description:"Provide a 'key ID' to specify which public key to encrypt with" } - openssl-old: { + openssl-old: { type: bool description: "Use older versions of openssl" } - openssl-program: { + openssl-program: { type:string description:"Specify an alternate program to use instead of 'openssl'" } - ssh-perms: { + ssh-perms: { type: bool description: "Disable the permission changes to the ssh folder" } @@ -236,23 +236,23 @@ export module config { } } } - + def generate_dot_value_and_descriptions [] { - + $yadm_config_characteristics | items { |outer_key outer_value| - $outer_value + $outer_value | items { |inner_key inner_value| { - value: $"($outer_key).($inner_key)" + value: $"($outer_key).($inner_key)" description: $inner_value.description } - + } - + } | flatten @@ -260,22 +260,22 @@ export module config { def get_auto_complete_value_based_on_what_context_gets_from_yadm_config_characteristics_type [context: string, ] { - - let cell_path_to_yadm_config_characteristic_key_type = $context - | split row "." - | append 'type' + + let cell_path_to_yadm_config_characteristic_key_type = $context + | split row "." + | append 'type' | into cell-path - let yadm_config_characteristic_key_type = $yadm_config_characteristics + let yadm_config_characteristic_key_type = $yadm_config_characteristics | get ($cell_path_to_yadm_config_characteristic_key_type) - + match $yadm_config_characteristic_key_type { - + string => null - + bool => [true false] - + $it if ($it | describe | str starts-with list) => { if ($it | any { |value| $value in [true false] }) { @@ -284,7 +284,7 @@ export module config { msg: "Invalid Configuration Value", help: "Please don't use place bool values in an array use the bool word instead" } - + } $it @@ -304,47 +304,47 @@ export module config { } - + export def main [ - key:string@generate_dot_value_and_descriptions + key:string@generate_dot_value_and_descriptions value?:any@get_auto_complete_value_based_on_what_context_gets_from_yadm_config_characteristics_type - --global - --local - --system - --worktree - --list - --edit + --global + --local + --system + --worktree + --list + --edit --type:string@generate_type_flag_completions - --bool - --int - --bool-or-int - --bool-or-str - --path - --expiry-date - --fixed-value - --null(-z) - --name-only - --includes - --show-origin - --show-scope - --file:string - --blob:string - --get:string - --default:string - --get-all:string - --get-regexp:string - --get-urlmatch:string - --replace-all: string - --get-color:string - --get-colorbool:string - --add:string - --unset:string - --unset-all:string - --remove-section:string - --rename-section:string - --comment:string - ] { - + --bool + --int + --bool-or-int + --bool-or-str + --path + --expiry-date + --fixed-value + --null(-z) + --name-only + --includes + --show-origin + --show-scope + --file:string + --blob:string + --get:string + --default:string + --get-all:string + --get-regexp:string + --get-urlmatch:string + --replace-all: string + --get-color:string + --get-colorbool:string + --add:string + --unset:string + --unset-all:string + --remove-section:string + --rename-section:string + --comment:string + ] { + if string !~ '(?\w+)(?\.)(?\w+)' { error make { @@ -356,15 +356,15 @@ export def main [ } } - - + + bash_yadm config ...( generate_viable_bash_string_flags { - global:$global - local:$local - system:$system - worktree:$worktree + global:$global + local:$local + system:$system + worktree:$worktree list:$list edit:$edit bool:$bool @@ -382,74 +382,74 @@ export def main [ file:$file blob:$blob get:$get - default:$default - get-all:$get_all - get-regexp:$get_regexp - get-urlmatch:$get_urlmatch - get-color:$get_color + default:$default + get-all:$get_all + get-regexp:$get_regexp + get-urlmatch:$get_urlmatch + get-color:$get_color get-colorbool:$get_colorbool - replace-all:$replace_all - add:$add - unset:$unset - unset-all:$unset_all + replace-all:$replace_all + add:$add + unset:$unset + unset-all:$unset_all remove-section:$remove_section rename-section:$rename_section comment:$comment } ) - - + + } - - + + } export def gitconfig [ - key:string + key:string value?:any - --global - --local - --system - --worktree - --list - --edit + --global + --local + --system + --worktree + --list + --edit --type:string@generate_type_flag_completions - --bool - --int - --bool-or-int - --bool-or-str - --path - --expiry-date - --fixed-value - --null(-z) - --name-only - --includes - --show-origin - --show-scope - --file:string - --blob:string - --get:string - --default:string - --get-all:string - --get-regexp:string - --get-urlmatch:string - --replace-all: string - --get-color:string - --get-colorbool:string - --add:string - --unset:string - --unset-all:string - --remove-section:string - --rename-section:string - --comment:string - ] { - + --bool + --int + --bool-or-int + --bool-or-str + --path + --expiry-date + --fixed-value + --null(-z) + --name-only + --includes + --show-origin + --show-scope + --file:string + --blob:string + --get:string + --default:string + --get-all:string + --get-regexp:string + --get-urlmatch:string + --replace-all: string + --get-color:string + --get-colorbool:string + --add:string + --unset:string + --unset-all:string + --remove-section:string + --rename-section:string + --comment:string + ] { + bash_yadm gitconfig ...( generate_viable_bash_string_flags { - global:$global - local:$local - system:$system - worktree:$worktree + global:$global + local:$local + system:$system + worktree:$worktree list:$list edit:$edit bool:$bool @@ -467,79 +467,79 @@ export def gitconfig [ file:$file blob:$blob get:$get - default:$default - get-all:$get_all - get-regexp:$get_regexp - get-urlmatch:$get_urlmatch - get-color:$get_color + default:$default + get-all:$get_all + get-regexp:$get_regexp + get-urlmatch:$get_urlmatch + get-color:$get_color get-colorbool:$get_colorbool - replace-all:$replace_all - add:$add - unset:$unset - unset-all:$unset_all + replace-all:$replace_all + add:$add + unset:$unset + unset-all:$unset_all remove-section:$remove_section rename-section:$rename_section comment:$comment } ) - + } - - -export module git-crypt { - + + +export module git-crypt { + # Share the repository using GPG export def add-gpg-user [user_id:string] { - + bash_yadm git-crypt add-gpg-user $user_id } - + # Configure a repository to use git-crypt export def init [] { - + bash_yadm git-crypt init } - + # Unlock encrypted files export def unlock [] { - + bash_yadm git-crypt unlock } # Export a symmetric secret key export def export-key [key_file_path:string] { - + bash_yadm git-crypt export-key $key_file_path - + } - + } - + export def transcrypt [ - --cipher(-c):string - --password(-p):string - --set-openssl-path:string - --yes(-y) - --display(-d) - --rekey(-r) - --flush-credentials(-f) - --force(-F) - --uninstall(-u) - --upgrade - --list(-l) - --show-raw(-s):string - --export-gpg(-e):string - --import-gpg(-i) - --context(-C) - --list-contexts - --version(-v) - --help(-h) - ] { - + --cipher(-c):string + --password(-p):string + --set-openssl-path:string + --yes(-y) + --display(-d) + --rekey(-r) + --flush-credentials(-f) + --force(-F) + --uninstall(-u) + --upgrade + --list(-l) + --show-raw(-s):string + --export-gpg(-e):string + --import-gpg(-i) + --context(-C) + --list-contexts + --version(-v) + --help(-h) + ] { + bash_yadm transcrypt ( generate_viable_bash_string_flags { cipher:$cipher @@ -561,23 +561,23 @@ export def transcrypt [ help:$help } ) - + } - + export def alt [file_path:string] { bash_yadm alt $file_path } - + export def encrypt [] { bash_yadm encrypt } - + export def decrypt [] { bash_yadm decrypt } - + export def perms [file_path:string] { bash_yadm perms $file_path } - + export def bootstrap [] { bash_yadm bootstrap } - + export def enter [] { bash_yadm enter } - + export module introspect { - + const possible_subjects = [ 'commands' 'repos' @@ -588,12 +588,12 @@ export def transcrypt [ def get_completions_for_subject [] { $possible_subjects } - + export def main [subject:string@get_completions_for_subject ] { - + if $subject not-in $possible_subjects { - let joined_possible_subjects = $possible_subjects + let joined_possible_subjects = $possible_subjects | str join "," error make { @@ -602,20 +602,20 @@ export def transcrypt [ text:"This value is incorrect!" span:(metadata $subject).span } - help: $"This value ($subject) isn't correct the ones are ($joined_possible_subjects)" + help: $"This value ($subject) isn't correct the ones are ($joined_possible_subjects)" } } bash_yadm introspect $subject - + } - + } - + module git { - export module stash { - + export module stash { + export def push [ --patch(-p) --staged(-S) @@ -641,15 +641,15 @@ module git { pathspec-from-file:$pathspec_from_file pathspec-file-nul:$pathspec_file_nul } - ) + ) } - + export def save [ - --patch(-p) - --staged(-S) - --keep-index(-k) - --no-keep-index + --patch(-p) + --staged(-S) + --keep-index(-k) + --no-keep-index --include-untracked(-u) --all(-a) --quiet(-q) @@ -667,35 +667,35 @@ module git { } if ($message | describe) != nothing { - - bash_yadm stash save $message ...$viable_bash_string_flags + + bash_yadm stash save $message ...$viable_bash_string_flags } bash_yadm stash save ...$viable_bash_string_flags - + } export def list [log_options?:string ] { if ($log_options | describe) == string { - - bash_yadm stash list $log_options - + + bash_yadm stash list $log_options + } bash_yadm stash list } - + export module show { - - + + def get-diff-algorithm-completions [] { ['patience' 'minimal' 'histogram' 'myers'] } - + def get-submodule-completions [] { ['short' 'log' 'diff'] } @@ -703,17 +703,17 @@ export module show { def get-color-completions [] { ['never' 'always' 'auto'] } - + def get-color-moved-completions [] { ['no' 'default' 'plain' 'blocks' 'zebra' 'dimmed-zebra'] } def get-color-moved-ws-completions [] { [ - 'no' - 'ingore-space-at-eol' - 'ingore-space-change' - 'ingore-all-space' + 'no' + 'ignore-space-at-eol' + 'ignore-space-change' + 'ignore-all-space' 'allow-indentation-change' ] } @@ -737,12 +737,12 @@ export module show { --indent-heuristic --no-indent-heuristic --minimal - --paitence + --patience --histogram --anchored --diff-algorithm:string@get-diff-algorithm-completions --stat:string - --stat-width:int + --stat-width:int --stat-count:int --stat-name-width:string --compact-summary @@ -819,10 +819,10 @@ export module show { --theirs(-3) --0 --include-untracked(-u) - --only-untracked + --only-untracked stash?:string ] { - + let viable_bash_string_flags = generate_viable_bash_string_flags { no-index:$no_index cached:$cached @@ -838,12 +838,12 @@ export module show { indent-heuristic:$indent_heuristic no-indent-heuristic:$no_indent_heuristic minimal:$minimal - paitence:$paitence + patience:$patience histogram:$histogram anchored:$anchored diff-algorithm:$diff_algorithm stat:$stat - stat-width:$stat_width + stat-width:$stat_width stat-count:$stat_count stat-name-width:$stat_name_width compact-summary:$compact_summary @@ -922,23 +922,23 @@ export module show { include-untracked:$include_untracked only-untracked:$only_untracked } - + if ($stash | describe) != nothing { - return (bash_yadm stash show $stash ...$viable_bash_string_flags) - + return (bash_yadm stash show $stash ...$viable_bash_string_flags) + } - + bash_yadm stash show ...$viable_bash_string_flags - + } } - + export def pop [ - --index - --quiet(-q) - stash:string + --index + --quiet(-q) + stash:string ] { bash_yadm stash pop $stash ...( @@ -947,12 +947,12 @@ export module show { quiet:$quiet } ) - + } - + export def apply [ --index - --quiet(-q) + --quiet(-q) stash:string ] { @@ -964,58 +964,58 @@ export module show { ) } - + export def branch [branchname:string stash?:string ] { if ($stash | describe) != nothing { - - return (bash_yadm stash branch $branchname $stash) + + return (bash_yadm stash branch $branchname $stash) } - bash_yadm stash branch $branchname - - + bash_yadm stash branch $branchname + + } - + export def clear [param: string, ] { - - bash_yadm stash clear - + + bash_yadm stash clear + } - + export def drop [--quiet(-q) stash:string ] { - bash_yadm stash drop $stash ...(generate_viable_bash_string_flags { quiet:$quiet }) - + bash_yadm stash drop $stash ...(generate_viable_bash_string_flags { quiet:$quiet }) + } - + export def create [] { bash_yadm stash create } - + export def store [] { bash_yadm stash store } - + } - export module remote { - + export module remote { + export def main [--verbose(-v)] { - + bash_yadm remote ...( generate_viable_bash_string_flags { verbose:$verbose } ) - + } @@ -1026,16 +1026,16 @@ export module show { } export def main [ - --t:string - --m:string - --f + --t:string + --m:string + --f --no-tags - --tags + --tags --mirror:string@get-mirror-completions name:string url:string ] { - + bash_yadm remote add $name $url ...( generate_viable_bash_string_flags { t:$t @@ -1046,37 +1046,37 @@ export module show { mirror:$mirror } ) - + } } export def rename [ - --progress - --no-progress - old:string + --progress + --no-progress + old:string new:string ] { - + bash_yadm remote rename $old $new ( generate_viable_bash_string_flags { - progress:$progress + progress:$progress no-progress:$no_progress } ) - + } export def remove [name: string, ] { - + bash_yadm remote remove $name } - export def set-head [ + export def set-head [ --auto(-a):string --delete(-d):string name:string @@ -1088,11 +1088,11 @@ export module show { delete:$delete } ) - + } export def set-branches [--add name:string ...branches:string ] { - + bash_yadm remote set-branches $name ...$branches ...( generate_viable_bash_string_flags { add:$add @@ -1102,9 +1102,9 @@ export module show { } export def get-url [--all --push,name:string] { - + bash_yadm remote get-url $name ...( - generate_viable_bash_string_flags { + generate_viable_bash_string_flags { push:$push all:$all } @@ -1116,12 +1116,12 @@ export module show { export def set-url [ --add --delete - --push - name:string - new_url:string - old_url:string + --push + name:string + new_url:string + old_url:string ] { - + bash_yadm remote set-url $name $new_url $old_url ...( generate_viable_bash_string_flags { add:$add @@ -1129,11 +1129,11 @@ export module show { push:$push } ) - + } export def show [--verbose(-v), --n name:string] { - + bash_yadm remote prune $name ...( generate_viable_bash_string_flags { verbose: $verbose @@ -1142,10 +1142,10 @@ export module show { ) } - - + + export def prune [--dry-run(-n), ...names:string] { - + bash_yadm remote prune ...$names ...( generate_viable_bash_string_flags { dry-run: $dry_run @@ -1168,17 +1168,17 @@ export module show { prune:$prune } ) - + } - + } - export module worktree { + export module worktree { export def add [ - --f + --f --detach --checkout --lock @@ -1218,12 +1218,12 @@ export module show { } ) - + } export def list [-v --porcelain -z ] { - + bash_yadm worktree list ...( generate_viable_bash_string_flags { v:$v @@ -1235,7 +1235,7 @@ export module show { } export def lock [--reason worktree: string, ] { - + bash_yadm worktree lock $worktree ...( generate_viable_bash_string_flags { reason:$reason @@ -1245,9 +1245,9 @@ export module show { } export def move [worktree:string new_path:string] { - - bash_yadm worktree move $worktree $new_path - + + bash_yadm worktree move $worktree $new_path + } export def prune [--n --v --expire:string] { @@ -1263,23 +1263,23 @@ export module show { } export def remove [-f worktree:string, ] { - + bash_yadm worktree remove $worktree ...( - generate_viable_bash_string_flags { - f:$f + generate_viable_bash_string_flags { + f:$f } - ) + ) } export def repair [ ...path:string ] { - + bash_yadm worktree repair ...$path } export def unlock [worktree:string] { - + bash_yadm worktree unlock $worktree } @@ -1300,7 +1300,7 @@ export module show { bad:string good:string ] { - + bash_yadm bisect start $good $bad ...( generate_viable_bash_string_flags { term-bad:$term_bad @@ -1310,33 +1310,33 @@ export module show { no-checkout:$no_checkout first-parent:$first_parent } - ) + ) } export def good [term:string] { - + bash_yadm bisect good $term - + } - + export def old [term:string] { - + bash_yadm bisect old $term - + } export def bad [term:string] { - + bash_yadm bisect bad $term - + } - + export def new [term:string] { - + bash_yadm bisect new $term - + } export def terms [ @@ -1345,7 +1345,7 @@ export module show { --term-good:string --term-old:string ] { - + bash_yadm bisect terms ...( generate_viable_bash_string_flags { term-bad:$term_bad @@ -1353,114 +1353,114 @@ export module show { term-good:$term_good term-old:$term_old } - ) + ) } export def skip [rev_or_range:string] { - + bash_yadm bisect skip $rev_or_range - + } export def visualize [--stat --p] { - + bash_yadm bisect visualize ...( generate_viable_bash_string_flags { p:$p stat:$stat } - ) - + ) + } export alias view = visualize export def replay [logfile:string] { - + bash_yadm bisect replay $logfile - + } export def log [] { - - bash_yadm bisect log - + + bash_yadm bisect log + } export def run [...cmd:string] { - - bash_yadm bisect run ...$cmd - + + bash_yadm bisect run ...$cmd + } export def help [] { - - bash_yadm bisect help - + + bash_yadm bisect help + } } export def add [ - --verbose(-v) - --dry-run(-n) - --force(-f) - --interactive(-i) - --patch(-p) + --verbose(-v) + --dry-run(-n) + --force(-f) + --interactive(-i) + --patch(-p) --edit(-e) --no-all - --all(-A) + --all(-A) --no-ignore-removal --ignore-removal - --update(-u) - --sparse - --intent-to-add(-N) + --update(-u) + --sparse + --intent-to-add(-N) --refresh - --ignore-errors - --ignore-missing - --renormalize - --chmod:string - --pathspec-from-file:string - --pathspec-file-nul + --ignore-errors + --ignore-missing + --renormalize + --chmod:string + --pathspec-from-file:string + --pathspec-file-nul ...pathspecs:string ] { bash_yadm add ...$pathspecs ...( generate_viable_bash_string_flags { - verbose:$verbose + verbose:$verbose dry-run:$dry_run - force:$force + force:$force interactive:$interactive - patch:$patch + patch:$patch edit:$edit no-all:$no_all - all:$all + all:$all no-ignore-removal:$no_ignore_removal ignore-removal:$ignore_removal - update:$update - sparse:$sparse - intent-to-add:$intent_to_add + update:$update + sparse:$sparse + intent-to-add:$intent_to_add refresh:$refresh - ignore-errors:$ignore_errors - ignore-missing:$ignore_missing - renormalize:$renormalize - chmod:$chmod - pathspec-from-file:$pathspec_from_file + ignore-errors:$ignore_errors + ignore-missing:$ignore_missing + renormalize:$renormalize + chmod:$chmod + pathspec-from-file:$pathspec_from_file pathspec-file-nul:$pathspec_file_nul } ) - + } export module branch { - - + + def get-track-completions [] { ['direct' 'inherit'] } - + export def main [ --color:string --no-color @@ -1513,7 +1513,7 @@ export module branch { pattern:$pattern track:$track no-track:$no_track - set-upsteam-to:$set_upstream_to + set-upstream-to:$set_upstream_to u:$u unset-upstream:$unset_upstream m:$m @@ -1530,7 +1530,7 @@ export module branch { } bash_yadm branch ...$viable_bash_string_flags - + } @@ -1538,94 +1538,94 @@ export module branch { export def fetch [ repository?: string - --all - --append(-a) - --atomic - --depth: int - --deepen: int - --shallow-since: string - --shallow-exclude: string - --unshallow - --update-shallow - --negotiation-tip: string - --negotiate-only - --dry-run - --write-fetch-head - --no-write-fetch-head - --force(-f) - --keep(-k) - --multiple - --auto-maintenance - --no-auto-maintenance - --auto-gc - --no-auto-gc - --write-commit-graph - --no-write-commit-graph - --prefetch - --prune(-p) - --prune-tags(-P) - --no-tags(-n) - --refmap: string - --tags(-t) - --recurse-submodules:string - --jobs(-j):int - --no-recurse-submodules - --set-upstream - --submodule-prefix: string - --upload-pack: string - --quiet(-q) - --verbose(-v) - --progress - --server-option(-o): string - --show-forced-updates - --no-show-forced-updates - --ipv4(-4) - --ipv6(-6) + --all + --append(-a) + --atomic + --depth: int + --deepen: int + --shallow-since: string + --shallow-exclude: string + --unshallow + --update-shallow + --negotiation-tip: string + --negotiate-only + --dry-run + --write-fetch-head + --no-write-fetch-head + --force(-f) + --keep(-k) + --multiple + --auto-maintenance + --no-auto-maintenance + --auto-gc + --no-auto-gc + --write-commit-graph + --no-write-commit-graph + --prefetch + --prune(-p) + --prune-tags(-P) + --no-tags(-n) + --refmap: string + --tags(-t) + --recurse-submodules:string + --jobs(-j):int + --no-recurse-submodules + --set-upstream + --submodule-prefix: string + --upload-pack: string + --quiet(-q) + --verbose(-v) + --progress + --server-option(-o): string + --show-forced-updates + --no-show-forced-updates + --ipv4(-4) + --ipv6(-6) ] { let viable_bash_string_flags = generate_viable_bash_string_flags { - all:$all - append:$append - atomic:$atomic - depth:$depth - deepen:$deepen - shallow-since:$shallow_since - shallow-exclude:$shallow_exclude - unshallow:$unshallow - update-shallow:$update_shallow - negotiation-tip:$negotiation_tip - negotiate-only:$negotiate_only - dry-run:$dry_run - write-fetch-head:$write_fetch_head - no-write-fetch-head:$no_write_fetch_head - force:$force - keep:$keep - multiple:$multiple - auto-maintenance:$auto_maintenance - no-auto-maintenance:$no_auto_maintenance - auto-gc:$auto_gc - no-auto-gc:$no_auto_gc - write-commit-graph:$write_commit_graph - no-write-commit-graph:$no_write_commit_graph - prefetch:$prefetch - prune:$prune - prune-tags:$prune_tags - no-tags:$no_tags - refmap:$refmap - tags:$tags - recurse-submodules:$recurse_submodules - jobs:$jobs - no-recurse-submodules:$no_recurse_submodules - set-upstream:$set_upstream - submodule-prefix:$submodule_prefix - upload-pack:$upload_pack - quiet:$quiet - verbose:$verbose - progress:$progress - server-option:$server_option - show-forced-updates:$show_forced_updates - no-show-forced-updates:$no_show_forced_updates - ipv4:$ipv4 + all:$all + append:$append + atomic:$atomic + depth:$depth + deepen:$deepen + shallow-since:$shallow_since + shallow-exclude:$shallow_exclude + unshallow:$unshallow + update-shallow:$update_shallow + negotiation-tip:$negotiation_tip + negotiate-only:$negotiate_only + dry-run:$dry_run + write-fetch-head:$write_fetch_head + no-write-fetch-head:$no_write_fetch_head + force:$force + keep:$keep + multiple:$multiple + auto-maintenance:$auto_maintenance + no-auto-maintenance:$no_auto_maintenance + auto-gc:$auto_gc + no-auto-gc:$no_auto_gc + write-commit-graph:$write_commit_graph + no-write-commit-graph:$no_write_commit_graph + prefetch:$prefetch + prune:$prune + prune-tags:$prune_tags + no-tags:$no_tags + refmap:$refmap + tags:$tags + recurse-submodules:$recurse_submodules + jobs:$jobs + no-recurse-submodules:$no_recurse_submodules + set-upstream:$set_upstream + submodule-prefix:$submodule_prefix + upload-pack:$upload_pack + quiet:$quiet + verbose:$verbose + progress:$progress + server-option:$server_option + show-forced-updates:$show_forced_updates + no-show-forced-updates:$no_show_forced_updates + ipv4:$ipv4 ipv6:$ipv6 } @@ -1649,7 +1649,7 @@ export def fetch [ --pathspec-from-file:string --pathspec-file-nul --ours - --theirs + --theirs --conflict --patch branch:string @@ -1668,8 +1668,8 @@ export def fetch [ theirs:$theirs patch:$patch } - ) - + ) + } @@ -1678,7 +1678,7 @@ export def fetch [ def get-empty-completions [] { ['drop' 'keep' 'stop'] } - + export def main [ --edit(-e) --no-commit(-n) @@ -1702,7 +1702,7 @@ export def fetch [ --abort ...commits:string ] { - + bash_yadm cherry-pick ...$commits ...( generate_viable_bash_string_flags { edit:$edit @@ -1726,7 +1726,7 @@ export def fetch [ abort:$abort } ) - + } } @@ -1738,7 +1738,7 @@ export def fetch [ --shared(-s) --reference --reference-if-able - --disssociate + --dissociate --quiet(-q) --verbose(-v) --progress @@ -1781,7 +1781,7 @@ export def fetch [ shared:$shared reference:$reference reference-if-able:$reference_if_able - disssociate:$disssociate + dissociate:$dissociate quiet:$quiet verbose:$verbose progress:$progress @@ -1815,11 +1815,11 @@ export def fetch [ jobs:$jobs } ) - + } -export module commit { +export module commit { def get-fixup-completions [] { ['amend' 'reword'] | each {|value| $"($value):" } @@ -1828,7 +1828,7 @@ export module commit { def get-cleanup-completions [] { ['strip' 'whitespace' 'verbatim' 'scissors' 'default'] } - + export def main [ --all(-a) --patch(-p) @@ -1873,7 +1873,7 @@ export module commit { --message(-m):string ...pathspec:string ] { - + bash_yadm commit ...$pathspec ...( generate_viable_bash_string_flags { @@ -1919,8 +1919,8 @@ export module commit { no-gpg-sign:$no_gpg_sign message:$message } - ) - + ) + } } @@ -1928,11 +1928,11 @@ export module commit { export module diff { - + def get-diff-algorithm-completions [] { ['patience' 'minimal' 'histogram' 'myers'] } - + def get-submodule-completions [] { ['short' 'log' 'diff'] } @@ -1940,17 +1940,17 @@ export module diff { def get-color-completions [] { ['never' 'always' 'auto'] } - + def get-color-moved-completions [] { ['no' 'default' 'plain' 'blocks' 'zebra' 'dimmed-zebra'] } def get-color-moved-ws-completions [] { [ - 'no' - 'ingore-space-at-eol' - 'ingore-space-change' - 'ingore-all-space' + 'no' + 'ignore-space-at-eol' + 'ignore-space-change' + 'ignore-all-space' 'allow-indentation-change' ] } @@ -1974,12 +1974,12 @@ export module diff { --indent-heuristic --no-indent-heuristic --minimal - --paitence + --patience --histogram --anchored --diff-algorithm:string@get-diff-algorithm-completions --stat:string - --stat-width:int + --stat-width:int --stat-count:int --stat-name-width:string --compact-summary @@ -2074,12 +2074,12 @@ export module diff { indent-heuristic:$indent_heuristic no-indent-heuristic:$no_indent_heuristic minimal:$minimal - paitence:$paitence + patience:$patience histogram:$histogram anchored:$anchored diff-algorithm:$diff_algorithm stat:$stat - stat-width:$stat_width + stat-width:$stat_width stat-count:$stat_count stat-name-width:$stat_name_width compact-summary:$compact_summary @@ -2153,17 +2153,17 @@ export module diff { base:$base ours:$ours theirs:$theirs - 0:$0 + 0:$0 } ) - + } } } -export module grep { +export module grep { def get-color-completions [] { ['never' 'auto'] @@ -2177,7 +2177,7 @@ export module grep { --no-exclude-standard --recurse-submodules --text(-a) - --textconv + --textconv --no-textconv --ignore-case(-i) -I @@ -2214,14 +2214,14 @@ export module grep { --threads:int -f:string -e - --and + --and --or --not --all-match --quiet(-q) ...$rest:string ] { - + bash_yadm grep ...$rest ...( generate_viable_bash_string_flags { cached:$cached @@ -2231,7 +2231,7 @@ export module grep { no-exclude-standard:$no_exclude_standard recurse-submodules:$recurse_submodules text:$text - textconv:$textconv + textconv:$textconv no-textconv:$no_textconv ignore-case:$ignore_case I:$I @@ -2268,20 +2268,20 @@ export module grep { threads:$threads f:$f e:$e - and:$and + and:$and or:$or not:$not all-match:$all_match quiet:$quiet } ) - + } } - export module log { + export module log { def get-decorate-completions [] { ['short' 'full' 'auto' 'no'] @@ -2353,17 +2353,17 @@ export module grep { def get-color-completions [] { ['never' 'always' 'auto'] } - + def get-color-moved-completions [] { ['no' 'default' 'plain' 'blocks' 'zebra' 'dimmed-zebra'] } def get-color-moved-ws-completions [] { [ - 'no' - 'ingore-space-at-eol' - 'ingore-space-change' - 'ingore-all-space' + 'no' + 'ignore-space-at-eol' + 'ignore-space-change' + 'ignore-all-space' 'allow-indentation-change' ] } @@ -2489,12 +2489,12 @@ export module grep { --indent-heuristic --no-indent-heuristic --minimal - --paitence + --patience --histogram --anchored --diff-algorithm:string@get-diff-algorithm-completions --stat:string - --stat-width:int + --stat-width:int --stat-count:int --stat-name-width:string --compact-summary @@ -2567,7 +2567,7 @@ export module grep { --ita-invisible-in-index ...rest ] { - + bash_yadm log ...$rest ...( generate_viable_bash_string_flags { follow:$follow @@ -2685,12 +2685,12 @@ export module grep { indent-heuristic:$indent_heuristic no-indent-heuristic:$no_indent_heuristic minimal:$minimal - paitence:$paitence + patience:$patience histogram:$histogram anchored:$anchored diff-algorithm:$diff_algorithm stat:$stat - stat-width:$stat_width + stat-width:$stat_width stat-count:$stat_count stat-name-width:$stat_name_width compact-summary:$compact_summary @@ -2762,7 +2762,7 @@ export module grep { ita-invisible-in-index:$ita_invisible_in_index } ) - + } } @@ -2838,19 +2838,19 @@ export module grep { } def get-color-completions [] { - ['never' 'always' 'auto'] + ['never' 'always' 'auto'] } - + def get-color-moved-completions [] { ['no' 'default' 'plain' 'blocks' 'zebra' 'dimmed-zebra'] } def get-color-moved-ws-completions [] { [ - 'no' - 'ingore-space-at-eol' - 'ingore-space-change' - 'ingore-all-space' + 'no' + 'ignore-space-at-eol' + 'ignore-space-change' + 'ignore-all-space' 'allow-indentation-change' ] } @@ -2976,12 +2976,12 @@ export module grep { --indent-heuristic --no-indent-heuristic --minimal - --paitence + --patience --histogram --anchored --diff-algorithm:string@get-diff-algorithm-completions --stat:string - --stat-width:int + --stat-width:int --stat-count:int --stat-name-width:string --compact-summary @@ -3054,7 +3054,7 @@ export module grep { --ita-invisible-in-index ...rest ] { - + bash_yadm reflog ...$rest ...( generate_viable_bash_string_flags { follow:$follow @@ -3172,12 +3172,12 @@ export module grep { indent-heuristic:$indent_heuristic no-indent-heuristic:$no_indent_heuristic minimal:$minimal - paitence:$paitence + patience:$patience histogram:$histogram anchored:$anchored diff-algorithm:$diff_algorithm stat:$stat - stat-width:$stat_width + stat-width:$stat_width stat-count:$stat_count stat-name-width:$stat_name_width compact-summary:$compact_summary @@ -3249,17 +3249,17 @@ export module grep { ita-invisible-in-index:$ita_invisible_in_index } ) - + } - + export def list [] { - + bash_yadm reflog list - + } - + export def expire [ --all --single-worktree @@ -3272,7 +3272,7 @@ export module grep { --verbose ...refs:string ] { - + bash_yadm reflog expire ...$refs ...( generate_viable_bash_string_flags { all:$all @@ -3286,9 +3286,9 @@ export module grep { verbose:$verbose } ) - + } - + export def delete [ --rewrite --updateref @@ -3297,7 +3297,7 @@ export module grep { --verbose ref:string ] { - + bash_yadm reflog delete $ref ...( generate_viable_bash_string_flags { rewrite:$rewrite @@ -3307,17 +3307,17 @@ export module grep { verbose:$verbose } ) - + } export def exists [ref:string] { - + bash_yadm reflog exists $ref - + } - - + + } export def reset [ @@ -3330,14 +3330,14 @@ export module grep { --keep --recurse-submodules --no-recurse-submodules - --refresh + --refresh --no-refresh --pathspec-from-file:string --pathspec-file-nul value?:string ] { - + let viable_bash_string_flags = generate_viable_bash_string_flags { quiet:$quiet patch:$patch @@ -3348,19 +3348,19 @@ export module grep { keep:$keep recurse-submodules:$recurse_submodules no-recurse-submodules:$no_recurse_submodules - refresh:$refresh + refresh:$refresh no-refresh:$no_refresh pathspec-from-file:$pathspec_from_file pathspec-file-nul:$pathspec_file_nul } - + if $value != nothing { - + return ( bash_yadm reset $value ...$viable_bash_string_flags ) - + } bash_yadm reset ...$viable_bash_string_flags @@ -3376,7 +3376,7 @@ export module grep { source:string destination:string ] { - + bash_yadm mv $source $destination ...( generate_viable_bash_string_flags { force:$force @@ -3386,7 +3386,7 @@ export module grep { } ) - + } @@ -3400,7 +3400,7 @@ export module grep { ['false' 'true' 'merges' 'interactive'] } - def get-negotation-tip-completions [] { + def get-negotiation-tip-completions [] { ['commit' 'glob'] } @@ -3412,7 +3412,7 @@ export module grep { 'octopus' 'ours' 'subtree' - + ] } @@ -3458,7 +3458,7 @@ export module grep { --shallow-exclude:string --unshallow --update-shallow - --negotiation-tip:string@get-negotation-tip-completions + --negotiation-tip:string@get-negotiation-tip-completions --negotiate-only --dry-run --porcelain @@ -3550,16 +3550,16 @@ export module grep { match [($repository | describe) ($refspec | describe)] { [string string] => (bash_yadm pull $repository $refspec ...$viable_bash_string_flags) - + [string nothing] => (bash_yadm pull $repository ...$viable_bash_string_flags) _ => (bash_yadm pull ...$viable_bash_string_flags) - } - - + } + + + - } } @@ -3573,8 +3573,8 @@ export module grep { def get-recurse-submodules-completions [] { ['check' 'on-demand' 'only' 'no'] } - - + + export def main [ --all --branches @@ -3652,14 +3652,14 @@ export module grep { match [($repository | describe) ($refspec | describe)] { [string string] => (bash yadm pull $repository $refspec ...$viable_bash_string_flags) - + [string nothing] => (bash yadm pull $repository ...$viable_bash_string_flags) - + _ => (bash_yadm push ...$viable_bash_string_flags) } - + } } @@ -3686,7 +3686,7 @@ export module grep { 'subtree' ] } - + export def main [ --continue --skip @@ -3708,7 +3708,7 @@ export module grep { --strategy-option(-X):string --rerere-autoupdate --no-rerere-autoupdate - --gpg-sign:string + --gpg-sign:string --no-gpg-sign --quiet(-q) --verbose(-v) @@ -3724,7 +3724,7 @@ export module grep { --ignore-whitespace --whitespace --committer-date-is-author-date - --ignore-date + --ignore-date --reset-author-date --signoff --interactive(-i) @@ -3732,16 +3732,16 @@ export module grep { --no-rebase-merges --exec(-x):string --root - --autosquash + --autosquash --no-autosquash - --autostash + --autostash --no-autostash - --reschedule-failed-exec + --reschedule-failed-exec --no-reschedule-failed-exec --update-refs --no-update-refs branch?:string - start_point?:string + start_point?:string end_point?:string ] { @@ -3766,7 +3766,7 @@ export module grep { strategy-option:$strategy_option rerere-autoupdate:$rerere_autoupdate no-rerere-autoupdate:$no_rerere_autoupdate - gpg-sign:$gpg_sign + gpg-sign:$gpg_sign no-gpg-sign:$no_gpg_sign quiet:$quiet verbose:$verbose @@ -3782,7 +3782,7 @@ export module grep { ignore-whitespace:$ignore_whitespace whitespace:$whitespace committer-date-is-author-date:$committer_date_is_author_date - ignore-date:$ignore_date + ignore-date:$ignore_date reset-author-date:$reset_author_date signoff:$signoff interactive:$interactive @@ -3790,11 +3790,11 @@ export module grep { no-rebase-merges:$no_rebase_merges exec:$exec root:$root - autosquash:$autosquash + autosquash:$autosquash no-autosquash:$no_autosquash - autostash:$autostash + autostash:$autostash no-autostash:$no_autostash - reschedule-failed-exec:$reschedule_failed_exec + reschedule-failed-exec:$reschedule_failed_exec no-reschedule-failed-exec:$no_reschedule_failed_exec update-refs:$update_refs no-update-refs:$no_update_refs @@ -3802,23 +3802,23 @@ export module grep { match [($branch | describe) ($start_point | describe) ($end_point | describe)] { - + [string string string] => ( bash_yadm rebase $branch $start_point $end_point ...$viable_bash_string_flags - ) - + ) + [string string nothing] => ( bash_yadm rebase $branch $start_point ...$viable_bash_string_flags - ) - + ) + [string nothing nothing] => ( bash_yadm rebase $branch ...$viable_bash_string_flags - ) - + ) + _ => (bash_yadm rebase ...$viable_bash_string_flags) } - + } } @@ -3846,7 +3846,7 @@ export module restore { --ignore-skip-worktree-bits --recurse-submodules --no-recurse-submodules - --overlay + --overlay --no-overlay --pathspec-from-file:string --pathspec-file-nul @@ -3870,13 +3870,13 @@ export module restore { ignore-skip-worktree-bits:$ignore_skip_worktree_bits recurse-submodules:$recurse_submodules no-recurse-submodules:$no_recurse_submodules - overlay:$overlay + overlay:$overlay no-overlay:$no_overlay pathspec-from-file:$pathspec_from_file pathspec-file-nul:$pathspec_file_nul } ) - + } } @@ -3971,7 +3971,7 @@ export module restore { --no-expand-tabs --notes:string --no-notes - --show-notes-by-default + --show-notes-by-default --show-notes:string --no-standard-notes --show-signature @@ -3990,7 +3990,7 @@ export module restore { no-expand-tabs:$no_expand_tabs notes:$notes no-notes:$no_notes - show-notes-by-default:$show_notes_by_default + show-notes-by-default:$show_notes_by_default show-notes:$show_notes no-standard-notes:$no_standard_notes show-signature:$show_signature @@ -4011,7 +4011,7 @@ export module restore { def get-ignored-completions [] { ['trditional' 'no' 'matching'] } - + export def main [ --short(-s) --branch(-b) @@ -4027,12 +4027,12 @@ export module restore { --no-column --ahead-behind --no-ahead-behind - --renames + --renames --no-renames --find-renames:int ...pathspecs ] { - + bash_yadm status ...$pathspecs ...( generate_viable_bash_string_flags { short:$short @@ -4049,7 +4049,7 @@ export module restore { no-column:$no_column ahead-behind:$ahead_behind no-ahead-behind:$no_ahead_behind - renames:$renames + renames:$renames no-renames:$no_renames find-renames:$find_renames } @@ -4064,11 +4064,11 @@ export module switch { def get-conflict-completions [] { ['merge' 'diff3' 'zdiff3'] } - + def get-track-completions [] { ['direct' 'inherit'] } - + export def main [ --create(-c):string --force-create(-C):string @@ -4114,13 +4114,13 @@ export module switch { if ($branch | describe) != nothing { - return (bash_yadm switch $branch ...$viable_bash_string_flags) - + return (bash_yadm switch $branch ...$viable_bash_string_flags) + } - bash_yadm switch ...$viable_bash_string_flags + bash_yadm switch ...$viable_bash_string_flags + - } } @@ -4129,7 +4129,7 @@ export module switch { export module tag { def get-color-completions [] { - ['never' 'always' 'auto'] + ['never' 'always' 'auto'] } def get-cleanup-completions [] { @@ -4149,19 +4149,19 @@ export module tag { --sort:string --color:string@get-color-completions --ignore-case(-i) - --omit-empty - --column:string + --omit-empty + --column:string --no-column - --contains:string - --no-contains:string - --merged:string + --contains:string + --no-contains:string + --merged:string --no-merged:string --message(-m):string --file(-F):string --edit(-e) --cleanup:string@get-cleanup-completions --create-reflog - --format:string + --format:string tag?:string commit?:string ] { @@ -4179,27 +4179,27 @@ export module tag { sort:$sort color:$color ignore-case:$ignore_case - omit-empty:$omit_empty - column:$column + omit-empty:$omit_empty + column:$column no-column:$no_column - contains:$contains - no-contains:$no_contains - merged:$merged + contains:$contains + no-contains:$no_contains + merged:$merged no-merged:$no_merged message:$message file:$file edit:$edit cleanup:$cleanup create-reflog:$create_reflog - format:$format + format:$format } match [($tag | describe) ($commit | describe) ] { - + [string string] => (bash_yadm tag $tag $commit ...$viable_bash_string_flags) - + [string nothing] => (bash_yadm tag $tag ...$viable_bash_string_flags) - + _ => (bash_yadm tag ...$viable_bash_string_flags) } @@ -4208,4 +4208,4 @@ export module tag { } -export use git * \ No newline at end of file +export use git * diff --git a/stdlib-candidate/std-rfc/bench.nu b/stdlib-candidate/std-rfc/bench.nu index 84f42a4..7c8e709 100644 --- a/stdlib-candidate/std-rfc/bench.nu +++ b/stdlib-candidate/std-rfc/bench.nu @@ -4,7 +4,7 @@ # round an integer amount of nanoseconds to 4th digit and convert to a real duration def "from ns" [] { if $in == 0 {0} else { #math log errors on 0 - math round -p (3 - ($in | math log 10 | math floor)) # rounds to 4th digit including, with maximum realtive err 0.05% + math round -p (3 - ($in | math log 10 | math floor)) # rounds to 4th digit including, with maximum relative err 0.05% | math round # second math round as a fix for `> 123456 | math round -p -5` = 99999.99999999999 } | into duration diff --git a/stdlib-candidate/std-rfc/script-parsing.nu b/stdlib-candidate/std-rfc/script-parsing.nu index e9aa2c4..7a2b9a7 100644 --- a/stdlib-candidate/std-rfc/script-parsing.nu +++ b/stdlib-candidate/std-rfc/script-parsing.nu @@ -19,7 +19,7 @@ # } # ``` # -# it's possible to write a much stronger script whith `parse-arg` +# it's possible to write a much stronger script with `parse-arg` # ```nushell # def main [ # x: string, # list diff --git a/stdlib-candidate/std-rfc/tables/reject-column-ranges.nu b/stdlib-candidate/std-rfc/tables/reject-column-ranges.nu index 62789fb..ed178d8 100644 --- a/stdlib-candidate/std-rfc/tables/reject-column-ranges.nu +++ b/stdlib-candidate/std-rfc/tables/reject-column-ranges.nu @@ -1,13 +1,13 @@ use ./col-indices.nu * -# Relect a range of columns by their indices +# Reject a range of columns by their indices # # Example: -# +# # ls | reject column-ranges 0 4 5 | first 3 export def "reject column-ranges" [ ...ranges ] { let column_selector = ($in | col-indices ...$ranges) $in | reject ...$column_selector -} \ No newline at end of file +} diff --git a/stdlib-candidate/std-rfc/tables/select-ranges.nu b/stdlib-candidate/std-rfc/tables/select-ranges.nu index 4b34b26..967c79d 100644 --- a/stdlib-candidate/std-rfc/tables/select-ranges.nu +++ b/stdlib-candidate/std-rfc/tables/select-ranges.nu @@ -13,7 +13,7 @@ use ./row-indices.nu * # ls / | select 5 # # Example - Select the 4th row. -# Note that the difference beteen this +# Note that the difference between this # and `select 3` is that the index (#) # column shows the *original* (pre-select) # position in the table.