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!
Sorry, I forgot to use `fill -c` and implemented `str repeat` with
similar function. Now change it back
Added a `log` helper function to avoid the frequent need to adjust the
output format
The original `lg` with a similar name was changed to `show`, but it is
basically only used for internal debugging.
I'm not sure if these should be merged, feel free to do whatever you
want
Co-authored-by: nash <nash@iffy.me>
A nu_101 script to give some examples of how to treat lists like other
data structures that nushell doesn't have natively. Namely queues,
stacks, and sets (and multisets sort of).
I'm also considering making some examples for trees and graphs, probably
using tables, although I might put them in another script so it doesn't
get too long.
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.
```
The [cookbook intro page](https://www.nushell.sh/cookbook/) gives an
example of a oneliner that I recently changed to imply is one of the
oneliners from this repo (nushell/nushell.github.io#1205), however that
oneliner isn't actually in this repo. This adds that oneliner to the
repo.
I also replaced the mention of the \#cool-oneliners channel that was
renamed to \#cool-scripts to just mention the general Nushell community.
- README.md: delete the content of template and replace it with a link
- comma_test: T/F execute a closure and return a true or false
- comma_tmpl: add example of building image
---------
Co-authored-by: nash <nash@iffy.me>
By default, the script that activates a python virtual environment for
nushell blindly prepends the virtual environment name to the existing
prompt, which causes the full-line prompt to wrap.
This change shows the virtual environment name properly positioned in
the prompt line.
To activate a python virtual environment with a pretty prompt:
```nu
---------------------------------------------------------- ~ ------------------------------------------------------- |V|
> $env.VIRTUAL_ENV_DISABLE_PROMPT = true; overlay use ve/mp2/bin/activate.nu
(mp2) ------------------------------------ ~/src/rust/nushell_worktrees/main ------------------------- [main ≡] --- |.V|
>
```
(the unobvious environment prefix is the subject of
nushell/nushell#11469)
This directory contains some examples of running recursive algorithms in
Nu. It also has the module : tramp which implements the Trampoline
pattern to overcome the lack of Tail Call Optimization (TCO) avoiding
unlimited stack growth.
---------
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
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
Checked the internal links with
[lychee](https://github.com/lycheeverse/lychee):
`
lychee.exe --offline modules\README.md
`
and I tried to fix links to new locations.
Co-authored-by: Mikko Viitamäki <mikko.viitamaki@logisnext.eu>
Closes#702. I was wrong in thinking the "night" and "storm" variants
should be much different — they're not. It's the divergent "moon"
variant between them that was missing. Added.
I have slight doubts about the darker gray `#828bb8` being used for e.g.
`ls` columns, but I think that basically correct. The high-contrast
foreground color `#c8d3f5` is the bright variant of that and should show
up in most other contexts I reckon.
- Supports `computed`, the definition method refers to
`$env.comma_scope.computed`, accepts two parameters, runtime parameters
and `$env.comma_scope`
- Supports `filter`, similar to `computed`, but only runs when declared,
specified through `$env.comm.flt`
- Supports `watch`, specified through `$env.comm.wth`. Support polling
like 'poll:2sec'
---------
Co-authored-by: nash <nash@iffy.me>
update:
- cwdhist: openeditor changed from alt+e to alt+o
- docker: pull, push add nerdctl insecure-registry support
- docker: registry show use curl instead http get (may cause dns
resolution problems)
- git: status `table -n` changed to `table -i`
new module: comma
Similar to `pwd-module`, but supports completion and description through
custom data formats
- `,` or `*` need to be exported in order to use `,` directly
- Directly execute `,` to create a new template file or edit an existing
file
- Custom tasks are written in `$env.comma` and can be nested
- Generate completions based on the structure of `$env.comma`
- You can use closure to customize completion
- In `$env.commax.act` of default closure, you can receive parameters
after the current position
- In `$env.commax.cmp` , you can receive the parameter before the
current position
---------
Co-authored-by: nash <nash@iffy.me>
Hey, it's me, I finally fixed this `use` vs `source` script.nu 😄
Also, I added a few lines of the `custom-completions/README.md` to
explain what happened in my case
Also renamed the module to task instead of job,
https://www.nushell.sh/book/background_task.html will need updating.
Other than that, this should work.
---------
Co-authored-by: RGBCube <RGBCube@users.noreply.github.com>
I have been using the script myself for a while, so I am fairly
confident that it works. I would prefer if I could make mamba activate
work out of the box but putting aliases in the file doesn't seem to
work, so If anyone knows how to make that work, that would be great.
i received an archive with files with integer ids in their names (1, 2,
...) but because these ids had no padding, the files were completely out
of order when sorting... e.g. 9 comes after 10 because 1 comes before 9
as a character 🤔
i wrote a command to rename a bulk of files in a directory with a
closure 😋
i was not really sure where to put it, so i created
`stdlib-candidate/fs.nu` 👍
This implementation prunes local branches that have been merged and
optionally prunes remote branches that have been merged.
The script may be configured to keep branches through local git
configuration.
The remote name can be autocompleted.