Sometimes, we have so many SSH servers that divide to extra config files
and include in *~/.ssh/config*
This PR follow the `Include` directive to retrieve more hosts.
Example of such config:
```ssh_config
Include extra/agriconnect
Include "extra/Old servers"
```
This PR also fix an issue that orginal code grabs this:
```ssh_config
Host *
```
This is a request to add yadm completions to the repo.
These resemble the ones that are written for. The git one in your repo.
Yadm is a dotfiles manager that leverages `git` but uses your home
directory by default.
To see the tool go to <https://yadm.io/docs/overview>
Just using the completions I realized that:
```nu
# Create a new git repository
export extern "git init" [
--initial-branch(-b) # initial branch name
#should be
--initial-branch(-b): string # initial branch name
]
```
because initial branch takes a string, it not a boolean
The linting flags `--warn`, `--deny`, `--allow` and `--forbid` have
`string` type rather than `bool`
Signed-off-by: OJarrisonn <j.h.m.t.v.10@gmail.com>
Remove custom completions for pixi.
Closes#937.
---
> [!NOTE]
> This is my first contribution to this project. I saw #937 and thought
it was a good first issue to help with 🙂
made scoop completions a bit more reliable by converting the PsObject
from powershell to json instead of parsing lines from the `scoop help`
output
doesn't take any longer since scoop run in powershell either way
Co-authored-by: unknown <67888720+kira-nyx@users.noreply.github.com>
Refactor docker custom completions to reorder `export extern`
declarations and make use of `export alias` to avoid repetition
Also fixes `docker run` needing a mandatory `network` argument which
doesn't exist
Just as a heads up, I haven't really tested this since a lot of it is
stuff I don't use or know how to set up without some reading up. I have
tested the nu_conda_2 change since I have a python project that I use
that for, and I could look into testing more of it if needed.
I've tried finding (naively using `/sys\W/`) all the usage of the old
plain `sys` calls and replacing them with alternates as appropriate,
which mostly has been to swap a `(sys).host.name` call into a
`$nu.os-info.name` one, since it'll be tad faster and more consistent
across platforms with naming (especially as the value comes from the
[rust stdlib](https://doc.rust-lang.org/std/env/consts/constant.OS.html)
and is very predictable).
Fixes#897
Added completions for most of the flags for `git grep`.
A few flags have been omitted for this PR due to Git expecting arguments
for those be passed without whitespaces. The arguments are optional, but
the flags would not work when passed arguments (see `--open-with-pager`
and `--color` flags in [this
commit](ffa9ceab73)
for how I tried to do it).
Ex.
`--open-with-pager(-O)` expects the optional argument to be passed as
either `--open-with-pager=<pager>` or `-O<pager>`. Including it in the
completions list as I had implemented it breaks the flag when using the
optional parameter.
Feedback appreciated for how to handle that. I'm still new to the Nu
language, so I might have missed something obvious that could fix that.
Git `nu-complete` defs where outdated, using a removed function
`nu-complete git switachable branches`, now using `nu-complete git
switch`
Already tested (except for tags)
Added `git restore` to git completions, as I was missing tab completion
for that.
I've begun to use Nushell regularly, so I hope this addition will be
useful to others as it is to me.
Feedback is appreciated if there's any conventions I've missed, or
options that need better wording.
I am sorry. I assumed that an SSH host in the config file must contain a
hostname, but this assumption is not true.
If a user reads an SSH host that doesn't contain a hostname, it will
fail to parse.
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.