I used [typos](https://github.com/crate-ci/typos/).
I manually checked all the corrections and they seem safe to me.
There are still some left, but those in this PR are good
Hi! Another bug I found, in `git`, you can
```bash
git stash show
```
with no args and should be alright, but the .nu script is requiring a
git name. (maybe for a previous version of git it was needed)
This PR fixes the conflicts between git-completions.nu and
git-aliases.nu.
Prior to this PR you would see problems like this
```nushell
❯ use custom-completions\git\git-completions.nu *
❯ use aliases\git\git-aliases.nu
Error: nu::parser::missing_flag_param
× Missing flag argument.
╭─[D:\nu_scripts\aliases\git\git-aliases.nu:64:1]
64 │ export alias gco = git checkout
65 │ export alias gcor = git checkout --recurse-submodules
· ──────────┬─────────
· ╰── flag missing string argument
66 │ export alias gcount = git shortlog --summary --numbered
╰────
```
This is because, in this example, in git-completions.nu, there is a
custom command named `git checkout` that takes a `--recurse-submodules:
string` parameter, which means it's expecting a string. Removing the `:
string` part fixes the issue and allows the files to be sourced/used as
expected.
This seems more like a hack than a fix. I'm not sure if this behavior is
intended or not, but this PR fixes it anyway.
close#493
The different commands such as `git checkout`, `git switch`, `git
cherry-pick` and `git rebase` all accept slightly differing refspecs.
This commit separates the extraction of refspecs and combines them in
individual completion commands for the different external commands.
All git commands complete with a table of `value | description` now.
Addresses #406
Co-authored-by: Simon Gasse <sgasse@users.noreply.github.com>
Added branch, remote, diff, commit, pull, stash, init, status, add, rm,
help, log, bisect
Also removed ? from `git rebase --onto` which was putting a literal `?`
into the flag when completing.