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.
Hi!
It's been a long time using nushell completions, It's about time I can
open a PR 😄
I couldn't finish it in one sitting, but I got the know-how, so I won't
be late to complete it. Left a bunch of `TODO`s
More completions coming!
Keep being awesome 🚀
it might be too trivial to manually create a completion. in many
scenarios, completion is a tree-shaped structure - the current candidate
is influenced by the previous candidate.
`completion-generator` generate completion through tree-like structures
````
{a: {b: {c: {d: 1 e: 2}
````
it uses existing positional arguments as a breadcrumbs to select
candidates in tree structures
as an example, `completion-generator flare` to create completion from
online json data
`completion-generator` supports different structural expressions
````
{value: desc}
{value: { next : ...}
[a b c ...]
[{value: a, description: b, next: [...]]
{|path| ...}
````
these different structures allow any kind of nesting
Co-authored-by: nash <nash@iffy.me>
- update `kadm check` and `kadm renew`
- refactor `nu-complete kube pods or deploys` to `nu-complete kube
deploys and pods`
in #680, `nu-complete kube pods` changed to `pods or deploys`, This has
caused some problems:
- double the number of candidates, and candidates with prefix `pods/`
and `deployment.apps/`, looks a little confused
- two requests in one completion, slower
i wrote `nu-complete kube deploys and pods`, it's completed in two
stages
- first it will complete the `deployment` and add a suffix `-` when
token not ends-with `-`
- when `ka` or `kl` accepts an argument with suffix `-`, it'll be
rewritten as `$"deployment/($pod | str substring ..-1)"`
- if token ends-with `-`, it's considered unfinished `pod` and continues
---------
Co-authored-by: nash <nash@iffy.me>
Add a module to manipulate records.
It can be a potential candidate to nu's standard library ?
Take a look at the name of the functions to see if they respect naming
convention (or if you have better ideas of course 😉 )
- imports `*` are unnecessary
- shorter names for easier reference in task scripts
- `cmd` is too common and may cause potential conflicts
Co-authored-by: nash <nash@iffy.me>
The script was running endlessly for me and the notion of crate waves
may be out of date, after removing them and manually aligning the output
with the relevant crate waves things went smooth.
New crate `nu-lsp`
Only treat `nu-cmd-lang` with the `build.rs` for `version` with the
`--no-verify` treatment in the separate wave
Reorder `nu-command` crates as there are dev-dependencies that may be a
problem
should be the last one... 😇
this PR adds `-toc` to the links in the TOC of the release note
template, they need that for the back reference to the TOC itself in the
section titles