Commit Graph

25 Commits

Author SHA1 Message Date
Auca Coyan
6585a0f515
🐛 fix optional arg in git stash show (#765)
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)
2024-02-26 15:42:28 -06:00
Darren Schroeder
a690fcbaa9
do not require stash in git stash drop (#732)
This fixes a small bug so that `git stash drop` doesn't _require_ a
stash
2024-01-11 07:45:11 -06:00
Faïz Hernawan
8635a78991
completions/git: fix support for path relative to current directory (#666)
Continuing effort on https://github.com/nushell/nu_scripts/pull/617
which only auto-completes path relative to git root.

Before,

```
$ cd src/

$ git add <tab>
src/main.rs    Modified
README.md      Untracked

$ git diff <tab>
src/main.rs
```

Now it displays,
```
$ cd src/

$ git add <tab>
main.rs           Modified
../README.md      Untracked

$ git diff <tab>
main.rs
```
2023-11-14 06:25:00 -06:00
Darren Schroeder
310b1df564
fix conflicts between git-completions.nu and git-aliases.nu (#651)
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
2023-10-26 15:11:47 -05:00
Marc Schreiber
9ceac61989
Fix git-completions.nu (#620)
The parsing of local git branches accidentally escaped an asterisks
because it had been used as an regular expression in the past.
2023-09-25 06:39:43 -05:00
Faïz Hernawan
9d0a182a86
completions/git: add filename completion to diff and checkout (#617) 2023-09-22 16:29:05 -05:00
Noah
4cbd678d78
Expand git completions (#587)
* Complete popping a particular stash

* Add some missing git completions

* Git prune subcommand

* Add filepath completion for `git add`
2023-08-31 07:46:59 -05:00
Emily Grace Seville
ee996ec169
fix(completions): clean-up (#484) 2023-05-11 06:08:36 -05:00
sgasse
9f480c470f
custom-completions: git: Expand completions (#407)
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>
2023-03-29 06:42:19 -05:00
David Lattimore
1884426d79
git-completions: Add completions for more subcommands (#420)
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.
2023-03-21 07:37:08 -05:00
sgasse
471c81c5ff
custom-completions: git: Add git rebase (#404)
Co-authored-by: Simon Gasse <sgasse@users.noreply.github.com>
2023-03-12 12:22:52 +01:00
Hofer-Julian
dc87ff276c
git-completions: Stop checking --force-with-lease (#362) 2023-01-25 06:22:50 -06:00
Marc Schreiber
6801071f50
Fix git checkout/switch completions (#359) 2023-01-24 06:02:58 -06:00
Marc Schreiber
e89b4ac6be
Improve git checkout/switch completions (#358) 2023-01-23 06:05:43 -06:00
Antoine Stevan
89c209f89e
add the "export" keyword to "extern git cherry-pick" (#356) 2023-01-21 13:16:23 -06:00
Marc Schreiber
a023cea71a
Add git cherry-pick completion (#355) 2023-01-21 07:19:52 -06:00
Arnout Engelen
47edd7dbbc
custom completions: git: 'git fetch' (#210) 2022-04-21 00:11:45 +02:00
Justin Ma
af33063bf3
Fix completions for git push and git checkout (#204) 2022-04-14 08:18:19 -05:00
Darren Schroeder
e6d8d2704e
update scripts to support str replace (#200) 2022-04-07 08:45:04 -05:00
Hofer-Julian
ef5de3ed96
Move completions to module format (#195)
* Move custom completions to module format

* Describe usage in README of custom completions
2022-03-31 06:30:07 -05:00
Darren Schroeder
7320f99f59
update completions (#193)
move the rest of the completions to module syntax
2022-03-28 07:57:54 -05:00
Darren Fuller
c58ca9c446
add git switch completion (#190) 2022-03-27 12:08:33 -05:00
JT
09abce0d18
Update git-completions.nu 2022-03-03 15:29:10 -05:00
Darren Schroeder
cdacab3df9
tweak git completions (#166) 2022-02-27 16:16:53 -06:00
Darren Schroeder
ca89da5242
reorganize site in preparation for beta and releaes (#161) 2022-02-25 13:10:38 -06:00