1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-30 13:47:46 +00:00
Commit graph

1194 commits

Author SHA1 Message Date
Nguyễn Hồng Quân
548b6bbe95
Complete package name for "uv remove" (#1072)
![image](https://github.com/user-attachments/assets/7653d26b-665f-4caa-a764-0f83b41f5519)

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.
2025-04-07 07:23:53 -05:00
Douglas
a19339cdaa
Move custom-completion auto-generate scripts to needs-update (#1076)
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.
2025-03-29 09:57:46 -04:00
Direwolfesp
e956708244
Autojump argument parsing (#1077)
I've changed the number of arguments of `def --env j [dir]` to `def
--env j [...dir]`, this change makes the behaviour more like the `j`
autojump you can find in other shells where an arbitrary number of
inputs are given to it.

ie. 
In zsh:

![image](https://github.com/user-attachments/assets/5de5611e-2681-46a0-93c4-d6e68922df13)

In nushell old j:

![image](https://github.com/user-attachments/assets/966dc6b0-cd9f-4d19-b662-e561c42bca83)

In nushell new j:

![image](https://github.com/user-attachments/assets/a73d10a1-1313-4dd8-815e-9e8a15a16101)
2025-03-23 08:25:08 -05:00
ViSaturn
13de3375c0
Allow ultimate_extractor to unzip exe files (#1075)
The unzip command can unzip exe files, this reflects that in
`ultimate_extractor.nu`
2025-03-22 08:29:57 -05:00
Róbert Kalmár
095fa411c7
Fix zellij layouts completions on MacOS (#1074)
According to the
[documentation](https://zellij.dev/documentation/configuration.html#where-does-zellij-look-for-the-config-file)
`~/.config/zellij` will take precedence even on MacOS.
2025-03-19 06:55:35 -05:00
Yethal
0bdf55f71f
Add custom completions for aws-cli (#1073)
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
2025-03-18 14:26:19 -05:00
Nguyễn Hồng Quân
861a99779d
Add completion for uv Python package manager (#1071)
![image](https://github.com/user-attachments/assets/d32230c2-31af-4193-ae4d-17084d1e45c5)


![image](https://github.com/user-attachments/assets/10cc7623-ba3a-447a-81fa-1d7dd09093c3)
2025-03-13 06:14:11 -05:00
Yethal
9ec9b2c7ab
Add nushell port of autoaspm (#1070)
This is a Nushell port of https://github.com/notthebee/AutoASPM written
mostly as an exercise in binary operations in Nushell.
There are several undocumented magic constants in the code that hail
back from the original version that was supposed to be here:
https://www.uwsg.indiana.edu/hypermail/linux/kernel/1006.2/02177.html
2025-03-12 09:40:01 -05:00
Ruan Comelli
61bb4f6b50
Fix heading in zoxide completions README (#1069)
This PR corrects the heading in `custom-completions/zoxide/README.md`,
changing it from "pytest completions" to "zoxide completions" to match
the intended content.
2025-03-11 13:41:52 -05:00
Ruan Comelli
33018df9f9
Fix typo in README file name for pytest's custom completions (#1068)
This PR fixes a typo in the README file name for pytest's custom
completions by renaming `RAEDME.md` to `README.md`. No other changes
were made.
2025-03-11 13:41:15 -05:00
fnuttens
b4decc6d00
Allow zvm use command to install a Zig version first (#1067) 2025-03-09 07:36:56 -05:00
Dan Michael O. Heggø
33a6ba406e
Fix typo: RAEDME.md -> README.md (#1066)
Fixes a small typo
2025-03-08 16:38:44 -06:00
Dan Michael O. Heggø
e732b79ce2
Fix ssh-completions when there's no includes (#1065)
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 :)
2025-03-08 16:38:17 -06:00
ziboh
10fc3797e0
fix(fnm): Automatic version switching failed. (#1064)
![image](https://github.com/user-attachments/assets/c31f7a3a-e312-4773-bb25-5e3c10747bd6)
2025-03-07 07:09:20 -06:00
Loïc Riegel
c517cd0075
add zoxide custom completions (#1063)
Hello, here are custom completions for zioxide, a tool which I really
like
2025-03-04 19:21:26 -06:00
ziboh
698e240647
style(scoop-completions): Format scoop-completions scripts with topiary-nushell (#1061) 2025-02-28 06:48:52 -06:00
fnuttens
a519391358
Add clean command for zvm module (#1060) 2025-02-27 15:43:15 -06:00
shemraz
3dc7970478
Add komorebi completions (#1055)
This is my first ever PR, hope I've done this right 😅
2025-02-26 08:45:41 -06:00
Blake Miner
f9b9636003
Improved find in: add --exclude flag and properly open files (#1059) 2025-02-25 07:02:02 -06:00
ziboh
096daa436d
Fix the fnm bug of Nushell reloading (#1058)
![image](https://github.com/user-attachments/assets/a528e891-1be3-4e87-ba5b-6f3f989177a6)
Opening a terminal in nvim results in the error shown above.
2025-02-25 06:22:18 -06:00
ziboh
8b40551de7
fix(scoop-completions): correct substring indices to properly trim .ps1 extension (#1056)
here will be an additional dot following each subcommand.

![image](https://github.com/user-attachments/assets/af72e9fa-b92e-4387-b0d8-ba4e84c5f2cf)
2025-02-24 11:43:49 -06:00
Nguyễn Hồng Quân
1da73cf106
Add compatibility note about Nu version (#1057)
This is my response for #1051 

The syntax of this note is inspired by Rust _Cargo.toml_ and Python
_pyproject.toml_.
2025-02-24 06:27:50 -06:00
Nguyễn Hồng Quân
1e7fdd4427
Improve completer speed for git checkout (#1054)
Improvement:
- Faster to give result (calling `git` less, telling `git` to return
simpler-to-parse output).
- Context aware. For example:
+ After `git checkout branch-name`, the rest arguments must be file
paths (`git checkout` only accepts one "branch").
  + After `--` are file paths. `git checkout a-branch -- a-file`

The current completer for `git checkout` is slow because:
- Running `git` too many times.
- Parse many results and end up not use.


![image](https://github.com/user-attachments/assets/48b8542b-0080-4962-a660-2a13e9cb76ea)


![image](https://github.com/user-attachments/assets/8e55e3cf-70bc-404a-b303-7a13d811b5fd)
2025-02-22 07:29:04 -06:00
fnuttens
d8a3d123ca
Add Windows support for zvm module (#1053) 2025-02-21 15:39:55 -06:00
fnuttens
9270f34d6b
Add Zig Version Manager (zvm) (#1052) 2025-02-19 16:19:36 -06:00
Douglas
a8919f9c01
Update TWiN script (#1047)
* 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.
2025-02-17 12:59:52 -05:00
Douglas
c17dcc3855
Fix failing lints on source files (#1049)
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.
2025-02-17 09:14:30 -05:00
Nguyễn Hồng Quân
446f06f34f
Improve SSH completion speed (#1050)
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.
2025-02-17 05:33:44 -06:00
Nguyễn Hồng Quân
c85083919e
Autocomplete for "git merge". (#1048)
Just support most often-used options and flags, though.


![image](https://github.com/user-attachments/assets/e9d411b7-6665-4796-bd7e-f06a80d06b73)


![image](https://github.com/user-attachments/assets/780482af-0022-4c16-9ffa-bc78a041c2de)
2025-02-16 07:21:30 -06:00
Nguyễn Hồng Quân
07050f877f
Provide completion for git subcommands (#1044)
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
2025-02-13 20:54:25 -06:00
Nguyễn Hồng Quân
a6c41303bb
Update toolkit.nu per removal of stdlib-candidate (#1046)
stdlib-candidate was removed in #1042 but test script still refer on it.

The concensus is to
[remove](https://github.com/nushell/nu_scripts/pull/1044#discussion_r1954636683)
the test case.
2025-02-13 20:53:09 -06:00
Justin Ma
90eb75d97f
Fix from env custom command (#1045)
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.
2025-02-13 06:18:13 -06:00
Douglas
5869e0b529
Deprecate the nu_scripts version of stdlib-candidate (#1042)
Deprecates the existing `stdlib-candidate` directories in `nu_scripts`
since `std-rfc` has now transitioned to the main repo. Updates readme
and renamed directories.
2025-02-09 14:34:40 -06:00
Nguyễn Hồng Quân
a31f8490fb
Add autocomplete for "docker image rm" (#1040) 2025-02-09 06:56:50 -06:00
Philipp A.
ee7422a12a
Add subcommand list to task module (#1039)
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.                               │
╰─────────────────────────┴───────────────────────────────────────────────────────────────────────────╯
```
2025-02-08 06:50:44 -06:00
Douglas
5b95311c2d
Additional std-rfc/conversions (#1032)
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.
2025-02-07 12:12:53 -06:00
Douglas
135450607c
Update release-notes template to point to plugins page (#1038)
As mentioned in https://github.com/nushell/nushell.github.io/issues/1788
(fix going forward).
2025-02-07 11:15:22 -05:00
Darren Schroeder
cfcd816335
update 20k club script to use polars (#1037)
I've been using these updates for a while but never committed them.
2025-02-07 08:43:40 -06:00
Jakub Žádník
d6b202ce83
Replace Twitter with Nushell blog in release note template (#1036) 2025-02-06 07:20:35 -05:00
Ian Manske
56b07b176e
Edit release note template (again) (#1035) 2025-02-05 05:48:59 +00:00
Ian Manske
7c6204dba5
Edit release note PR template (#1034)
Reorders and simplifies the TODO steps in the release note PR template.
2025-02-05 05:32:47 +00:00
rutexd
b45fd953c1
Oneliner script to set tab color in a Windows Terminal (#1031)
Simple oneliner script to set color for Windows Terminal.

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2025-02-03 16:58:47 -06:00
Douglas
32baeb7995
Added std-rfc README with installation instructions (#1030)
Includes a `README.md` for the `std-rfc` modules with 
information on how to checkout *just* `std-rfc` from the repo.
2025-01-31 22:19:04 -05:00
Douglas
bab7845ed4
Additional clip copy options (#1028)
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.
2025-01-31 16:45:29 -05:00
Andrey Stepanov
10b22626f7
Added custom completions for loco and cargo loco commands (#1029) 2025-01-30 06:29:47 -06:00
Douglas
dbcecf2653
key-value module for std-rfc (#965)
`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.
2025-01-29 12:57:48 -05:00
Dave
e6da07f512
Add git reset completion (#1027)
Added a git completion for git reset.
2025-01-28 08:53:33 -06:00
Douglas
eaf7ecfd02
Move Table/List helper module to new std-rfc (#1025)
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.
2025-01-27 10:21:53 -05:00
Bahex
abc1330406
fix(aggregate): modify input-output types to provide a more helpful error message (#1024)
implement
https://github.com/nushell/nu_scripts/pull/991#issuecomment-2615815135
2025-01-27 08:01:42 -06:00
Douglas
f950405fbe
Fix issue with testing.nu in 0.101.1 (#1023)
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.
2025-01-27 07:47:24 -06:00