
Drawback:
The flags of "uv remove" command are no longer completed after I add
competer like this:
```nu
export extern "uv remove" [
--no-config
--help(-h)
--version(-V)
...packages: string@"nu-complete uv packages"
]
```
I have no solution yet.
A user in Discord recently tried to run the auto-generate script to
create completions from `<command> --help` and had issues. In examining
the scripts, I found that they used `build-string`, which was deprecated
and removed over 2 years ago. In order to prevent future confusion until
(and if) these files are updated, I'm moving them to a `needs-update`
directory in the repo.
Any other outdated files can be moved there as well.
Aws-cli ships with a dedicated completion binary that only needs to be
passed current commandline to work. Space is appended to returned
results so that completing subcommands can be done simply by pressing
tab multiple times
This PR corrects the heading in `custom-completions/zoxide/README.md`,
changing it from "pytest completions" to "zoxide completions" to match
the intended content.
The ssh-completion didn't work when I first tried to source it. Turned
out that `reduce` failed when `$includes` was an empty list:
```nushell
$includes | par-each {|p| $p | open --raw | process } | reduce {|it| merge deep $it --strategy=append }
```
The change proposed in this PR fixes the problem so the completion also
works if there are no includes in the ssh config files. I'm a total
nushell beginner though, so I'm not sure if it's the best or the most
idiomatic way to solve the problem :)
* Retrieves previous 7 days of contributions by default
* Checks all repos under the `nushell` user - Reports against the most
recent (up to 30, and we currently only have 26) with updates.
* Uses the GitHub client to authenticate if available, with fallback to
a token, then username/password
* Cleans up a lot of the URL building using more recent Nushell
commands.
This PR updates the toolkit testing to:
* Determine whether to lint as a module or source file based on the
presence of any `export ` line in the file.
* Run `nu-check` on files before linting with `use <file>` or `source
<file>`
* Updates the environment variable to `TEST_METHOD` with options for
`ide-check` or `import-or-source`.
* Updates the default to `import-or-source` (was `ide-check`) to match
CI
* Removes environment variable from CI since this test method is now the
default.
With this in place we should have far fewer (false positive) failing CI
runs.
In my machine, the SSH host definitions are spread over many files and
the old implementation is slow to give auto-complete.
This PR is to improve the speed.
This is to provide completion for when user types `git [Tab]`.
There is already completion for `git help [Tab]` but I don't know why
author don't add it to `git` alone.
Fixes#1043
Fix `from env` custom command
#### Description
This pull request addresses issues with the `from env` custom command in
the Nushell script, improving the handling and sanitization of parsed
environment variable values. The main focus of this update is to enhance
the parsing behavior to handle edge cases and ensure proper formatting
of output.
Deprecates the existing `stdlib-candidate` directories in `nu_scripts`
since `std-rfc` has now transitioned to the main repo. Updates readme
and renamed directories.
Could use some polish, but with this, after
```nu
use .../task.nu
```
the command `task` exists and will output this
```console
$ task
╭─────────────────────────┬───────────────────────────────────────────────────────────────────────────╮
│ task clean │ Remove tasks from the status list. │
│ task edit │ Edit the command, path or label of a stashed or queued task. │
│ task group │ Use this to add or remove groups. │
│ task group add │ Create a new group with a name. │
│ task group remove │ Remove a group with a name. │
│ task kill │ Kill specific running tasks or whole task groups. │
│ task log │ Display the output of tasks. │
│ task pause │ Either pause a running tasks or a specific groups of tasks. │
│ task queue │ Queue stashed tasks for execution. │
│ task remove │ Remove tasks from the queue. │
│ │ Running or paused tasks need to be killed first. │
│ task restart │ Restart failed or successful task(s). │
│ task send │ Send something to a task. Useful for sending confirmations such as "y\n". │
│ task set-parallel-limit │ Set the maximum parallel tasks for a group. │
│ task shutdown │ Shutdown pueue and thus this module. │
│ task spawn │ Spawn a task to run in the background, even when the shell is closed. │
│ task start │ Resume operation of specific tasks or groups of tasks. │
│ task stash │ Stash a task that is not currently running. │
│ task status │ Display the current status of all tasks. │
│ task switch │ Switches the queue position of two tasks. │
│ │ Only works for queued or stashed tasks. │
│ task wait │ Wait until the provided tasks are finished. │
╰─────────────────────────┴───────────────────────────────────────────────────────────────────────────╯
```
Adds additional conversions suggested by @Bahex in [on
Discord](https://discord.com/channels/601130461678272522/1333517965722910802/1333792425658941441).
Some renaming to match the "conversions" style as much as possible.
Namely, using `into` in the command names:
* `columns-into-table`
* `record-into-columns`
* `table-into-columns`
I'm still not quite sure about:
* `name-values`
Most commands use either a verb or preposition rather than an adjective,
so `named` didn't quite seem to work. It could be `list-into-record`,
but `into record` itself already accepts a list.
---
Also provided help, examples, and tests for all commands.
Addition to `clip` module (#1009):
* Passes complex values through `table -e` to render properly
* By default, strips ansi codes, unless `--ansi (-a)` switch is used
* Adds a `clip prefex` command which can accept a prefix string like `# => ` to be added to the
beginning of each line.
`std-rfc/kv` is a straightforward but flexible interface for setting and
getting key-value pairs.
## Use-cases
* Ergonomically assign the result of a pipeline to a "variable". Just
"Up Arrow" and append `| kv set foo`.
* Use mid-pipeline to assign a "variable" and yet still continue the
pipeline
* Use mid-pipeline to inspect the state (like the `inspect` command) and
examine the results via `kv list` or `kv get` after the command
completes.
* Chaining assignments/setters
* Set universal variables once and access them even after the shell
exits (or in other simultaneously running shells).
## Features
* Values can be any Nushell type other than a closure. Values are
converted to and from nuons that are stored in a SQLite database.
* The module's commands can operate on either an in-memory database
(using `stor`) or on-disk (`into sqlite`).
* Includes a hook that enables "universal variables" similar to that of
the Fish shell. Universal variables are environment variables that are
immediately updated and available in *all* Nushell sessions that are
running the hook. Since they are stored in an on-disk SQLite database,
they also persist when the shell exits.
* Because kv pairs are stored as rows in a database, they can be
removed, unlike normal variables.
* kv pairs are easily converted to a record using `| transpose -dr`. The
resulting record is, of course, easily converted to environment
variables using `load-env`.
* Assignment can come from either pipeline input or a positional
parameter. When both are provided, the positional parameter is preferred
so that `$in` can be used.
* A closure can be used to modify the pipeline input before storing.
* Can optionally return either the pipeline input (default), the value
that was set, or the entire store back to continue the pipeline.
This module was previously in `std-rfc`, but was left behind when we "reset" it. This
simply moves it back into `std-rfc` for evaluation along with updates for latest main changes.
https://github.com/nushell/nushell/pull/14741 has surfaced an issue with
an incorrect signature in `testing.nu` which caused it to fail
completely. This fixes the signature and allows tests to run properly.