1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-29 21:27:47 +00:00
Commit graph

1194 commits

Author SHA1 Message Date
Sandyandi N. dela Cruz
ba9a4c1cac
Enhance gwta (#1143)
Allow automatic association to an existing branch or creation of new
branch with `gwta` when 2nd positional parameter (`branch`) is omitted.
2025-07-17 06:53:13 -05:00
Luca Scherzer
b09b60cc43
fix: url encoding (#1142)
The Wolframalpha API call would previously throw an error due to an
incorrect layout of the input data to the url encoding step.
This commit fixes it
2025-07-08 06:40:09 -05:00
Techno Tecna
f0cd46cafc
Fix custom completion for pass by converting the path pattern string to glob (#1141)
Password file completion for `pass` no longer worked as the pattern was
passed to `ls` as a string.
Fixed it by converting the pattern to a glob.

Co-authored-by: TechnoTecna <techno.tecna@protonmail.com>
2025-07-03 03:51:53 -05:00
René Stalder
b7120045bc
fix: replace filter with where in composer completions (#1140)
refs https://github.com/nushell/nu_scripts/issues/1134
2025-07-01 06:19:26 -05:00
Filipp Samoilov
6faa666e55
Strip ANSI from the main branch name (#1139)
`find` highlights the returned value,
which breaks the `gcm` macro,
it returns 
```
error: pathspec '?[37m?[0m?[41;37mmain?[0m?[37m?[0m' did not match any file(s) known to git
```

I opted in to using `ansi strip` instead of `--no-highlight`, because I
think it covers wider range of nu shell versions
2025-06-30 06:25:48 -05:00
shimeoki
45934922f1
fix: pause in background_task (#1138)
i found out that it worked incorrectly, so i fixed it based on other
functions in the module
2025-06-29 13:07:57 -05:00
gin-lsl
156a0110c7
fix(npm): update incompatible npm scripts (#1137)
I use Nushell and npm, and noticed that the npm section hasn't been
updated for a long time, to the point where it no longer works with
current npm versions. In fact, the current script produces the following
result:

![image](https://github.com/user-attachments/assets/272a6a37-c623-452a-94ab-2f3c0ee54beb)

So I've updated the npm-related scripts to fix this issue. Now it works
correctly:

![image](https://github.com/user-attachments/assets/fcf8b590-0ede-4571-bd52-611cf4c9fdd3)


Additionally, since npm -l | lines generates over 900 lines of output,
this causes each run to take a long time (at least on my machine).
Therefore, I've implemented caching using stor to store the results,
which significantly reduces the execution time for subsequent calls.
With caching enabled, the delay is now barely noticeable.
2025-06-24 17:09:03 -05:00
Darren Schroeder
32cdc96414
replace filter with where (#1135)
This PR tries to clean up the use of `filter` by replacing it with
`where`. I did not test each script.

closes #1134
closes #1133
2025-06-12 06:42:16 -05:00
Piepmatz
84c25bbc6d
Update cargo hack command for making a release (#1132) 2025-06-10 21:13:44 +02:00
Filipp Samoilov
2e39c27560
Fix error in non-home paths (#1129)
Before it would fail in paths outside the home directory with

```
 × Pipeline empty.
    ╭─[/home/filipp/.config/nushell/panache-git.nu:32:76]
 31 │   let current_dir_relative_to_home = (
 32 │     do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join
    ·                                                                            ────┬───
    ·                                                                                ╰── no input value was piped in
 33 │   )
    ╰────
```
2025-06-09 06:09:18 -05:00
KyQiao
6fe7713322
change match to case-insensitive (#1128)
`micromamba 2.1.1` change the output of `micromamba info` to lower case.
Change the match to case-insensitive to make it work on version `2.1.1`
2025-06-05 06:29:09 -05:00
S. Abid Hashimi
3c32fbfade
Prepend INCLUDE env, instead of override (#1127)
This small fix prepends the `INCLUDE` environment variable instead of
overriding it.

This is important if one has already added paths to this environment,
for example, in cases where one needs a common set of codebase that gets
included in all C/C++ projects (such as utility functions and such).
2025-06-02 19:10:20 -05:00
Cong Luan Tran
765555bedd
fix Tokyonight Moon theme color (#1125)
Previously, this doesn't follow the Moon pallette
2025-05-22 11:09:50 -05:00
Arthur Laurent
b2d512f6c6
fix nu_msvs (#1116)
nu_msvs doesn't work at all on my setup, vswhere return empty string
when called from nushell, the only way i made it to work is calling it
from powershell

on json parsing side
installationPath is not an array, and vswhere return an array of
installations is not correct

e.g
```json
[
  {
    "instanceId": "406fd398",
    "installDate": "2024-04-25T13:16:29Z",
    "installationName": "VisualStudioPreview/17.14.0-pre.5.0+36025.13",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Preview",
    "installationVersion": "17.14.36025.13",
    "productId": "Microsoft.VisualStudio.Product.BuildTools",
    "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Preview\\Common7\\Tools\\LaunchDevCmd.bat",
    "state": 4294967295,
    "isComplete": true,
    "isLaunchable": true,
    "isPrerelease": true,
    "isRebootRequired": false,
    "displayName": "Visual Studio Build Tools 2022",
    "description": "Visual Studio Build Tools vous permet de générer des applications MSBuild natives et managées sans passer par l'IDE Visual Studio. Il existe des options pour installer les compilateurs et bibliothèques Visual C++, ainsi que la prise en charge d'ATL, de MFC et de C++/CLI.",
    "channelId": "VisualStudio.17.Preview",
    "channelUri": "https://aka.ms/vs/17/pre/channel",
    "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
    "installedChannelId": "VisualStudio.17.Preview",
    "installedChannelUri": "https://aka.ms/vs/17/pre/channel",
    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=661273#17.14.0-pre.5.0",
    "resolvedInstallationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Preview",
    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288",
    "updateDate": "2025-04-29T20:49:54.8401699Z",
    "catalog": {
      "buildBranch": "d17.14",
      "buildVersion": "17.14.36025.13",
      "id": "VisualStudioPreview/17.14.0-pre.5.0+36025.13",
      "localBuild": "build-lab",
      "manifestName": "VisualStudioPreview",
      "manifestType": "installer",
      "productDisplayVersion": "17.14.0 Preview 5.0",
      "productLine": "Dev17",
      "productLineVersion": "2022",
      "productMilestone": "Preview",
      "productMilestoneIsPreRelease": "True",
      "productName": "Visual Studio",
      "productPatchVersion": "0",
      "productPreReleaseMilestoneSuffix": "5.0",
      "productSemanticVersion": "17.14.0-pre.5.0+36025.13",
      "requiredEngineVersion": "3.14.2074.57458"
    },
    "properties": {
      "campaignId": "",
      "channelManifestId": "VisualStudio.17.Preview/17.14.0-pre.5.0+36025.13",
      "includeRecommended": "0",
      "nickname": "",
      "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
    }
  }
]
```
2025-05-15 18:58:47 -05:00
Jan Klass
189c3d646e
fishgen: Fix flags crossing subcommands (#1122) 2025-05-11 16:33:28 -05:00
Jan Klass
f371420c5b
fishgen: Drop unnecessary line length check (#1118)
The following starts-with 'complete' where filter covers it as well.
2025-05-11 08:58:19 -05:00
Cattle_Horse
4f7d9a626a
feat(git): Added complementary support for the git config subcommands (#1117) 2025-05-10 07:37:51 -05:00
TheCodeLamp
4ecbb0e04e
Fixed rusty-paths.nu entering into rust folder (#1115)
When starting a new shell session inside a rust folder you'd get this
error:


![image](https://github.com/user-attachments/assets/dd6ad06c-fc82-4a92-b0cd-18e41c1d3254)

This pr fixes this issue.

Entering a folder without having a previous folder happen when you for
example start a new terminal or starts a multiplexer already inside that
folder.
2025-05-05 07:33:58 -05:00
Nguyễn Hồng Quân
54f10ee7ee
Fix when lftp bookmark file is not readable (#1114)
Sorry, in the #1113 , I forgot to test the case that `lftp`'s bookmark
file is not readable.
2025-05-03 18:25:23 -05:00
Nguyễn Hồng Quân
e82487722b
Add completions for lftp (#1113)
[lftp](https://lftp.yar.ru/) is the program which I use when I need to
copy many files at once via SSH. Though having `FTP` in the name, it
supports more protocols than just FTP.

This PR provides auto-completion for the "site" argument. Source of
sites are:
- SSH aliases (for SFTP and FISH protocols).
- LFTP's bookmarks.


![image](https://github.com/user-attachments/assets/4c6c5876-069b-454c-9e49-5e43c9061a52)
2025-05-03 16:14:52 -05:00
Nguyễn Hồng Quân
c0e88c5756
Eliminate duplication in uv completion script (#1112)
This script was generated by uv itself (then add more modification to
provide group completion), but has too many duplication. This PR is to
fix that.
2025-05-03 08:38:00 -05:00
Alexandre CONTASSOT
4bc37c125f
Fix datetime theme color (#1111)
In Nushell 0.104.0, `date` are now `datetime` ([see
blog](https://www.nushell.sh/blog/2025-04-29-nushell_0_104_0.html#date-is-now-datetime-toc)).

I just change all `date` prop to `datetime` in all themes to fix them
2025-05-03 08:00:56 -05:00
Mussar
16e22d07da
Add Game Demo: nu-niversal paperclips (#1108)
Inspired by @kiil, this PR adds another game for exploration &
inspiration - this time, based on the seminal incremental idle game
[Universal
Paperclips](https://www.decisionproblem.com/paperclips/index2.html).

This game implements a screen drawing loop with a roughly 60FPS
framerate, asynchronous user interaction via the new `job send` and `job
recv` commands, rudimentary deltatime calculations, and the ability to
save and load state memory.

The game does not feature any of the special mechanics that emerge from
the original, though a future project may emerge to make a more 1:1
replica of the original.

I have also updated the .gitignore to make sure no one accidentally
pushes their game save to the repo after trying it out. 😃
2025-05-01 15:31:25 -05:00
Francesc Elies
5e732dadb0
fix(gh): list my stars wrong sorting (52 seconds ago) <Francesc Elies> (#1110)
github stars listing was wrong because humanized date strings were being
sorted instead datetime objects.

Ref.
https://github.com/nushell/nu_scripts/pull/1109#discussion_r2070528888
2025-05-01 15:22:10 -05:00
Francesc Elies
9ec598c72a
feat(gh): list my stars (#1109)
Sometimes you know you starred something long time ago, the you go to
github.com your stars and search on the bar.

That's all good but wouldn't it be great to do that from the comfort of
nushell?

This pr does that.

You can test it with
```nu
gh my stars | explore
```
2025-05-01 11:52:42 -05:00
Jan Klass
618c0c035d
In task module mention job command (nushell background jobs) (#1107) 2025-04-29 11:41:17 -05:00
Francesc Elies
82aacd5d54
windows nushell stuff (#1105)
Sometimes I have to use windows, 

I would like to have a place were I can find useful nushell stuff making
my easier and maybe eventually copy stuff other people might contribute.

Would you see this fit?

**NOTE**: I will gladly remove editorconfig if you prefer a separate pr
or you don't want it at all.
2025-04-29 08:56:26 -05:00
Francesc Elies
b442c96ec2
feat(gh-completions): view inlined-comments (#1106)
Adds a command to see comments in github pullrequest.

You can test it as follows

![image](https://github.com/user-attachments/assets/ab76dad8-81f3-432e-9aca-c27227928f96)

One problem I would like to solve is when comments are a very long
single line, in that case the colum becomes very wide, using `explore` I
have the sample problem. Is there an easy way to make text wrap inside a
cell if text longer than a certain threshold e.g. 100 chars?

![image](https://github.com/user-attachments/assets/06dbd03c-e508-48bb-88c3-61809370f5a5)
2025-04-28 06:48:55 -05:00
Amen
9560df9370
Fix(conda.nu): Update Mamba/Conda info parsing and fix syntax errors (#1104)
This PR updates the `modules/virtual_environments/nu_conda_2/conda.nu`
script to address several issues encountered with newer versions of
Mamba/Conda and Nushell.

**Problem:**

The existing script failed when used with recent Mamba versions (e.g.,
Mamba 2.x) due to changes in the JSON output format of `mamba info
--json`. Specifically:
* The key for environment directories is now `"envs directories"`
instead of `"envs_dirs"`.
* The key for the base environment path is now `"base environment"`
instead of `"root_prefix"`.
* The `mamba info --envs --json` command returns minimal information,
requiring separate calls to `mamba info --json` to get necessary details
like `envs_dirs` and `root_prefix`.

Additionally, several Nushell syntax errors were present:
* Incorrect syntax for assigning the result of a multi-branch `if/else`
expression to a variable using `let`.
* Incorrect usage of `run-external`, attempting to pass flags like
`--json` directly instead of as separate string arguments.
*   The `--no-banner` flag is not supported by `mamba info`.

These issues resulted in errors like `Cannot find column 'envs_dirs'`,
`Could not find environment named '...'`, `keyword_missing_arg`, and
`unknown_flag`.

**Solution:**

This PR implements the following fixes:

1.  **Updated `load-conda-info-env`:**
    *   Detects Mamba/Conda/Micromamba correctly.
* For Mamba, makes separate calls to `mamba info --json` and `mamba info
--envs --json`.
* Explicitly extracts `envs_dirs` and `root_prefix` using the correct
key names (`"envs directories"`, `"base environment"`) observed in Mamba
2.x output.
* For Conda, assumes `conda info --json` provides all necessary keys
(`envs_dirs`, `root_prefix`, `envs`).
    *   Includes basic logic for Micromamba (parsing text output).
* Constructs the `$env.CONDA_INFO` record reliably with the required
keys.
2.  **Corrected Nushell Syntax:**
* Fixed the `let cmd_base = ...` assignment by wrapping the `if/else`
expression in parentheses `()`.
* Fixed all `run-external` calls to pass the command and arguments as
separate strings (e.g., `run-external "mamba" "info" "--json"`).
3. **Removed Unsupported Flag:** Removed `--no-banner` from `mamba info`
calls.
4. **Improved Error Handling:** Added checks in `activate` to ensure
`$env.CONDA_INFO` was loaded successfully. Changed `error make` to
`print --stderr` and `return null` in `check-if-env-exists` for
potentially smoother failure modes.
5. **Minor Improvements:** Cleaned up PATH manipulation, improved the
completer function, added comments.

**Testing:**

This version has been tested successfully with:
*   Mamba 2.1.0
*   Nushell 0.103.0
* Activating environments by name (`activate myenv`) and by full path
(`activate /path/to/myenv`).
*   Deactivating environments (`deactivate`).

It should also work correctly with standard Conda installations.
Micromamba support is based on the original script's logic and may
require further testing.

Fixes issues like those encountered during the debugging session leading
to this PR.
2025-04-22 21:34:46 -05:00
Lennart Kiil
67e74c5657
add games folder and simple game demonstrating nu code concepts (#1100)
I'd like to contribute this game.

The code exemplifies several nu concepts.
2025-04-22 18:10:59 -05:00
jaredmontoya
a515c4217e
add capture-foreign-env module (#1099)
This is a modified version of [capture-foreign-env command from nushell
wiki](https://www.nushell.sh/cookbook/foreign_shell_scripts.html#detailed-explanation-of-capture-foreign-env).
Unlike the wiki version It relies on `null_byte` instead of `newline` as
a delimiter for environment variables dumped by the `env` command which
allows it to support multi-line foreign environment variables.
2025-04-22 18:10:43 -05:00
Jan Klass
488b9b0bc3
Update some fish-sourced generated completion files (#1103)
Run `build-completions-from-pwd` from fish-shell completions

Through needs-update/custom-completions/auto-generate/parse-fish.nu with
https://github.com/fish-shell/fish-shell
share/completions/
9d904e111345a64eb4ff05ecd8d7737f22cfc762

Selective on which files to take over for reviewability and certain
improvements
2025-04-22 13:51:22 -05:00
Jan Klass
ddaa6f5bf1
Update some fish-sourced generated completion files (#1102)
Run `build-completions-from-pwd` from fish-shell completions

Through needs-update/custom-completions/auto-generate/parse-fish.nu with
https://github.com/fish-shell/fish-shell
share/completions/
9d904e111345a64eb4ff05ecd8d7737f22cfc762

Selective on which files to take over for reviewability and certain
improvements
2025-04-22 13:50:27 -05:00
Jan Klass
43ac47a06b
Drop generated highlight.nu which has no source anymore (#1101)
`highlight.fish` has been removed upstream in
2cb60bed1000a781bf427b56108bba2e7c68ba32

> Remove share/completions/highlight.fish
>
> Highlight ships its own completion script:
>
https://gitlab.com/saalen/highlight/-/blob/master/sh-completion/highlight.fish


2cb60bed10
2025-04-22 13:49:50 -05:00
Jan Klass
448b0177c3
Add md-to-clip custom completions (#1089)
Resolves #414

* Syntax source
https://github.com/command-line-interface-pages/v2-tooling/tree/main/md-to-clip

---

I used the descriptions from the Fish completions on the referenced
page/docs.

```nushell
nu ❯ help md-to-clip
Converter from TlDr format to Command Line Interface Pages format.
https://github.com/command-line-interface-pages/v2-tooling/tree/main/md-to-clip

Usage:
  > md-to-clip {flags} <file> ...(args)

Flags:
  -h, --help: Display help
  -v, --version: Display version
  -a, --author: Display author
  -e, --email: Display author email
  --no-file-save: Whether to display conversion result in stdout instead of writing it to a file
  --output-directory <path>: Directory where conversion result will be written
  --special-placeholder-config <path>: Config with special placeholders

Parameters:
  file <path>: Source tldr page to convert
  ...args <external-argument>: all other arguments to the command
```
2025-04-22 12:58:22 -05:00
Jan Klass
d382af3008
Drop added PATHs on folder leave (#1098)
Resolves #1078

Previous behavior: Navigating into a folder with a `Cargo.yml` prepends
the target folders to `PATH`. They never get removed. Navigating into
different cargo folders one after the other leads to repeated PATH
extensions.

New behavior: Navigating into a folder with a `Cargo.yml` prepends the
target folders to `PATH`. Leaving a folder with a `Cargo.yml` drops the
target folders from `PATH`.

There is no guarantee that they were added by the script when entering.
The PATH could have had the target entries before entering. However,
when using this hook, it seems reasonable to assume that this prepend
and drop behavior is desired. It also seems reasonable to assume that
build target folders would not be used for normal util operations.
2025-04-22 12:57:11 -05:00
Jan Klass
123cc5f505
Fix winget show completions (#1091)
Update `winget show` completions according to official docs at
https://learn.microsoft.com/en-us/windows/package-manager/winget/show

Sort flags like official documentation.

Remove multiple flags which seemingly come from `winget install`;
presumably a copy-paste error when originally implementing this command.
2025-04-21 06:16:55 -05:00
Jan Klass
0b4a1a62a0
Use path join to join path parts (#1097)
Use system specific path separator instead of always `/` leading to a
path with mixed separators on Windows.
2025-04-21 06:14:14 -05:00
Jan Klass
4f54b1ab9a
Support configs with no hooks in rusty-paths.nu (#1096)
Use upsert instead of update to support configurations without PWD-env
hooks (the default)
2025-04-21 06:13:31 -05:00
Jan Klass
c62a46d6e3
Fix parse-fish.nu (#1094)
Adjust so it does not throw syntax errors and works for at least some
sampled `.fish` files.

Related #968, #258, #256

---

Sample `abook`:

```nushell
nu ❯ rm abook.nu -f; build-completion abook.fish abook.nu; open abook.nu
# Show usage
extern "abook" [
        --add-email                                     # Read email message from stdin and add the sender
        --add-email-quiet                                       # Same as --add-email. Without confirmation
        --convert                                       # Convert address book files
        --informat                                      # Input file format
        --outformat                                     # Output file format
        --formats                                       # Print available formats
        ...args
]
```
2025-04-20 10:03:24 -05:00
Jan Klass
98973a271f
Improve auto-gen README.md (#1093)
* Fix typo
* Add code fences
* Use `nushell` instead of `nu` code block language, so it renders
correctly on GitHub
* Use correct headline levels (only one instead of three top headlines)
* Add paragraph spacing where applicable
* Add trailing newline
2025-04-20 10:02:47 -05:00
Jan Klass
d48b4a0b2b
Remove duplicate "moved" auto-generate files from old location (#1092)
PR #1076 titled 'Move custom-completion auto-generate scripts to
needs-update' added the README and target files,
but was missing the removal of the source files (moved files).

The files in `needs-update/custom-completions/auto-generate/` are
identical.
2025-04-20 10:02:18 -05:00
Jan Klass
959c42978b
Fix winget-completions breaking winget show (#1090)
by dropping output parsing of non-stable unstructured output into
structured output.

---

winget-completions.nu defines more than custom completions: it defines
parsing for `winget show`, `winget source list`, `winget search`,
`winget list`.

`winget show` shows different user messages and rendered manifest
information.

#825 reports winget show breakage for `winget show` for packages
`carapace`, `Peppy.Osu!`, `flux.flux`.

The source yaml (for example
[rsteube.Carapace.locale.en-US.yaml][sourceyaml]) is in YAML format. The
command implementation tries to parse the rendered output and transform
it into yaml, but fails to do so. The logic is quite complicated and
error prone, with no guarantees on `winget show` output stability in
text or format.

Rather than trying to this the script, it seems safer to drop parsing
the output into a structure format. #825 indicates winget show has been
broken for a year.

If we want to support structured output from `winget show`, it would be
preferable to depend on `winget show` offering a structured output
option (which it currently does not offer), or at least not offer
error-prone parsing as a default part of *custom completions*. Users can
still parse the output themselves. Independent of this removal, users
may suggest alternative less error-prone or custom-completion-breaking
approaches.

[sourceyaml]:
2ec31577c4/manifests/r/rsteube/Carapace/1.3.0/rsteube.Carapace.locale.en-US.yaml

Resolves #825

BREAKING: Drops structured output from `winget show`
2025-04-20 10:01:42 -05:00
Jan Klass
bb19fddc61
Port before_v0.60 parse_aws_s3_ls.nu (#1086)
Tested with https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html
example output

Note that the script has a placeholder parameter
`s3://your-bucket-and-path`. The script is moved into the `sourced`
folder like all the other ported scripts from the cool_oneliners folder
before it, but sourcing it as-is is not meaningful.

This ports the last file in `before_v0.60`, consequently resolving #221.
2025-04-19 08:47:13 -05:00
Jan Klass
1930c7b47f
Drop draft note (#1088)
This comment was a WIP draft note.
The separate `git show` command call is not necessary because
`get-all-git-local-refs` through `for-each-ref` already includes the
commit title. So the comment can be dropped without further
consideration / is already resolved.
2025-04-19 08:42:48 -05:00
Jan Klass
3ad271f838
Improve git completions (#1087)
* Fix previous logic assuming single remote name `origin`
* Fix wrong Local vs Remote branch name descriptions
* Fix git branch output with multiple branches per line breaking
auto-completions
* Fix current branch not showing up in git checkout branch completions
* Fix remote branches not showing up when local branch with upstream
exists despite them being different refs
* Show more contextual information in completion descriptions
* Use consistent sorting between command completions; Local branches
before remote branches before files before commits, with sorting from
git kept intact

Change implementation to a more encapsulated and type-specific approach:

* Use for-each-ref instead of git branch with manual current branch
query and current and HEAD ref removal
* Separate local and remote branch logic for good case separation
  * Use separate for-each-ref calls for early case separation
* Decorate local and remote branch information in their respective cases
instead of content-conditional
* Decorate with 'Branch, Local|Remote, Commit Sha1 Subject, upstream
[head|behind x]
* Use new consistent description format '{Type}' | '{Type}, Commit
{Sha1} Subject | '{Type}, {Subtype}, {Commit Sha1+Subject}, {upstream
name + track}
* Dissolves some spread out logic, dropping commands
get-all-git-branches and extract-remote-branches-nonlocal-short and
extract-mergable-sources

Influenced completions: `git checkout`, `git switch`, `git merge`

---

Screenshot: 

![](https://github.com/user-attachments/assets/f4030039-87f3-46fd-841c-b961edf4c37a)

Should resolve #1041

Screenshot from before, showing a wrong classification of a local branch
as remote branch:


![](https://github.com/user-attachments/assets/7cbb9545-fe24-48eb-9772-1bba775fcf29)
2025-04-19 06:52:43 -05:00
Cattle_Horse
4d0f184096
feat: Provide completion for docker subcommands (#1085)
This is to provide completion for when user types `docker [Tab]`.
2025-04-18 10:43:19 -05:00
Sergey
c639113ade
Basic git improvements (#1082)
Thanks to @Euphrasiologist for the prompt!

I found some bugs, and here are a few improvements.
1. Fix checking if currently in git repo (#1079)
2. Use `git branch --show-current` instead of `git rev-parse
--abbrev-ref HEAD` to get current branch
3. Refactor processing current status (relying on
https://git-scm.com/docs/git-status). Before, in some cases it leads to
unexpected behavior. (for example, when renaming or deleting files)
2025-04-14 05:59:27 -05:00
BattyBest
d7adaf9880
Fix $env.PATH for direnv (#1083)
While using direnv with nushell, I noticed that my autocompletion for
external programs stopped working as soon as I entered a directory and
direnv loaded.

Turns out, direnv exports $PATH as a string, and nushell stores $PATH as
a table and expects it to be one. Worse, nu just silently fails any
operations with the $PATH (except for running programs) instead of
reporting an error.

This PR fixes that by adding a line in the direnv config.nu script that
parses that string into the appropriate table.
Testing it on my system (NixOS, nushell, direnv + lorri) it seems to
work perfectly fine and the $PATH works again.
2025-04-12 20:10:03 -05:00
Mussar
b7869a8f33
Add AeroSpace completions (#1080)
First attempt at a full custom completion! Got all the base commands set
and documented. Most arguments are fleshed out, but I haven't figured
out a good solution for subcommands that have exclusive arguments, or
how to progressively show subcommands with their own set of externs.

I've put the completed-but-not-implemented work in a separate file, to
be incorporated later as I figure out the process to do so.

---------

Co-authored-by: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com>
2025-04-07 09:57:43 -05:00