Changing "export def" to "export extern" to not shadow the original
command as it would disallow anything not defined in the re-definition
There seem to be similar cases in completions for (naive search with "rg
'export def'")
- mask
- winget (exports some defs and some externs. So i dont know if those
defs are actually additional functionality)
- pnpm (only exports some 'nu-complete' defs)
- pass (only exports some 'nu-complete' defs)
I don't feel comfortable changing those as i am not familiar with them.
[`kw`](https://github.com/kworkflow/kworkflow) is a tool used by kernel
developers to help with the workflow
---------
Co-authored-by: Lais_Nuto_Rossman <laisnuto@gmail.com>
Rustup help page changed, so the commands that were based on the old
layout to get the completions were broken
Improved some completions to include a description like "default" or
"installed"
Also added completions for `rustup help`
Reverts nushell/nu_scripts#868
I found that this works, if you source these files like
```
use aliases/git/git-aliases.nu *
use custom-completions/git/git-completions.nu *
```
but if you source them like this, it doesn't work.
```
use custom-completions/git/git-completions.nu *
use aliases/git/git-aliases.nu *
```
This changed recently somewhere in nushell.
TL;DR: The "simple" example from
https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html
is currently not compatible with the custom completion script found in
`custom-completions/make/make-completions.nu`. This PR tries to fix
that.
As I was working on `nur` (https://github.com/ddanier/nur) and the
`nurify` script to convert to `nur` from different task runners
(https://github.com/ddanier/nur/blob/main/scripts/nurify.nu) I wanted to
create a good way to convert from using `make`. So I thought the `make`
completion would for sure implement a good way to get a list of all
possible `make` targets. Hence I started looking at
`custom-completions/make/make-completions.nu`.
Then I searched for a good documentation for how `Makefile`s work, as
the last time I was using this myself is about 5 to 10 years ago. If you
for example look at the documentation on gnu.org you may find examples
of `Makefile`s not working with the current autocompletion. See
https://www.gnu.org/software/make/manual/html_node/Simple-Makefile.html
for example, the "simple" example they provide.
The reason for this not working is that the targets use some whitespace
after the target name. This is somehow allowed and thus valid. See
https://www.gnu.org/software/make/manual/html_node/Rule-Introduction.html
for a quick overview about how the `Makefile`s syntax works. I quickly
checked this to ensure `make` actually parses this correctly, it really
does.
This means that the current `make` completion does miss support for the
"simple" example provided my `make` itself. So I went on to fix this.
My suggested solution is:
* Filter all lines by regex `'^[\w\.-]+\s*:'` to ensure possible targets
- start with some word (also allowing `.` and `-`)
- may have some whitespaces after the word
- has ":" after this
* Split by the ":"
* Use first column
* Trim the remaining target name to remove those nasty whitespaces
* Use result for completion
For me this did fix the issue with the "simple" `Makefile`, allowing me
to put this into my `nurify` script.
Would be nice to get this "backported" to nu scripts as well. Might help
others 😉
Adds completions for when using a `./gradlew` script in Gradle projects
The script provides completions both for the script flags and for the
available tasks in the current project
Allow custom-completions/yarn to complete scripts and bins by explicitly
listing existing commands and scripts & bins that loads from the current
path.
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
Here is a bunch of fixes I implemented to make Winget custom completion
script functional.
Namely,
- Made it compatible with the latest Nushell version
- Fixed parsing of Winget show command
- Added the missing command aliases
- Implemented a workaround for the in Winget itself when filtering for a
particular package source -
https://github.com/microsoft/winget-cli/issues/4236
Implemented definitions for all composer 2.7 base commands with flags,
arguments, and descriptions. Also add completions when a set of values
is expected 🙂
I added the missing shims, alias, and help commands for the scoop
completer (#483)
I also updated the deprecated `rootPath` and `globalPath` config names
for the config command
Hi! I reduced some of the errors in the daily CI. Still there are a few
of them, but at least is something
- Added the badge for the `daily.yml` (currently failing)
- removed old `docker` from v0.60
- removed old `git` from auto-generate completions
- removed `nethack` from auto-generate completions (wasn't very useful)
- removed `root` from auto-generate completions (wasn't very useful)
- removed `valgrind` from auto-generate completions (wasn't very useful)
- moved `less` from auto-generate to custom-completions.
- moved `mix` from auto-generate to custom-completions.
- moved `tar` from auto-generate to custom-completions.
- moved `tcpdump` from auto-generate to custom-completions.
- moved `virsh` from auto-generate to custom-completions.
- moved `zef` from auto-generate to custom-completions.
- fixed `base16.nu`
- fixed `from-cpuinfo.nu`
- fixed `from-dmicode.nu`
- fixed `to-number-format.nu`
- fixed `to-json-schema.nu`
This is some legwork to the CI
- [x] fix one `get-row.nu` before 0.60, just because it was easy
- [x] `modules/formats/to-ini.nu`
- [x] `modules/git/git-v2.nu`
- [x] `modules/git/git.nu`
- [x] `modules/log/log.nu`
- [x] `modules/weather/weatherdark.nu`
- [x] `sourced/api_wrappers/worlframalpha.nu`
- [x] `sourced/cool-oneliners/pwd-short.nu`
- [x] `sourced/github/branch-protections/branch-protections.nu`
- [x] `sourced/gitlab/gitlab.nu`
- [x] `sourced/misc/nu_defs.nu`
- [x] `sourced/update-path.nu`
- [x] `sourced/webscraping/shell_starts.nu`
I moved some auto-generated commands:
- [x] `ack`
- [x] `as`
- [x] `curl`
- [x] `fsarprc`
- [x] `fsarpri`
- [x] `godoc`
- [x] `mysql`
- [x] and `xgettext`
to custom, so we keep the modifications.
I had to comment some of the flags because the parser is not able to
parse some flags. Those are explained in comments
Hi. In the latest zellij (0.39.2), the output of `zellij ls` has been
changed into the following example:
```bash
rectangular-galaxy [Created 9h 21m 46s ago] (EXITED - attach to resurrect)
gregarious-triceratops [Created 22h 48m 32s ago] (EXITED - attach to resurrect)
```
I updated the corresponding parsing code.
I added a lot, but not all the `rg` flags. Currently there are 107 and
most of them aren't "results" related, but compatibility for terminals,
negate previous flags when searching multiple regexes and more.
I selected the most useful flags and write them down in the file.
I accept any suggestion!
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)
Hi!
I found another bug, if you write
```bash
$ gh repo create
```
it leads you to a series of prompts, but the current nu script throws an
error.
I fixed that and `gh repo fork` too, in which you don't necessarily need
an argument.
This PR extends the existing completion for the pass command to include
all existing subcommands (as of pass v1.7.4). It also adds completions
for the pass-otp and pass-update extensions.
Completions for [pixi](https://github.com/prefix-dev/pixi) generated
from the [last commit
(e330e4b831959452b859079f45fdc77e45d741a9)](e330e4b831)
to date using the clap auto generation.
Parser did a good job here, explaining
```
Error: × Deprecated: --flag: bool
╭─[C:\...\nu_scripts\custom-completions\winget\winget-completions.nu:27:1]
27 │
28 │ def "nu-complete winget flagify" [name: string, value: any, --short(-s): bool] {
· ──┬─
· ╰── `--flag: bool` is deprecated and will be removed in 0.90. Please use `--flag` instead, more info: https://www.nushell.sh/book/custom_commands.html
29 │ let flag_start = if $short { '-' } else { '--' }
╰────
```
is not possible anymore, so I removed all the `: bool`s and sourced the
script correctly!
This is a (probably crude) attempt to address an issue where using the
`gh status` command with gh completions installed would yield the
following error:
```
> gh status
Error: nu::parser::missing_positional
× Missing required positional argument.
╭─[entry #1:1:1]
1 │ gh status
╰────
help: Usage: gh status {flags} <command> . Use `--help` for more information.
```
Hi!
Another command I use frequently. I expected more completions to do, but
turns out `code` is kinda short on flags (compared to `gh` at least)
Some base groundwork is done, it's only missing the `tunnel` and
`serve-web` commands