* remove the template
* update the theme generation script
* fix the local path to the lemnos themes
* use the real `export der main` module template
* remove the empty lines and the comments from theme files
* adapt the default config file theme to the template
This commit uses closures for `filesize`, `date` and `bool`.
* put quotes around all the colors in the template
* fix the `else` of `filesize` => returns a true record now
* use default colors for the filesize
* regenerate all the themes with `./make.nu`
The different commands such as `git checkout`, `git switch`, `git
cherry-pick` and `git rebase` all accept slightly differing refspecs.
This commit separates the extraction of refspecs and combines them in
individual completion commands for the different external commands.
All git commands complete with a table of `value | description` now.
Addresses #406
Co-authored-by: Simon Gasse <sgasse@users.noreply.github.com>
* Add CODEOWNERS file
On its own, the only thing this does is request reviews from codeowners.
If virtual_environments is touched, @Hofer-Julian will be requested.
Otherwise, @fdncred.
Combined with branch protection rules, this can enforce who is allowed
to review and merge pull requests touching certain parts of the code.
* Add core team
Added branch, remote, diff, commit, pull, stash, init, status, add, rm,
help, log, bisect
Also removed ? from `git rebase --onto` which was putting a literal `?`
into the flag when completing.
* change the main command of the themes to `main`
Command used:
```
sd 'export def .* \[\] \{' 'export def main [] {' themes/themes/**/*
```
This commit mitigates the following equivalent error
```
>_ module spam { export def spam [] { "this is spam::spam" } }
Error: nu::parser::named_as_module
× Can't export command named same as the module.
╭─[entry #74:1:1]
1 │ module spam { export def spam [] { "this is spam::spam" } }
· ──┬─
· ╰── can't export from module spam
╰────
help: Module spam can't export command named the same as the module. Either change the module name, or export `main`
custom command.
```
when running `use themes/themes/dracula.nu` for instance.
* change the template as well to define a `main` function
* do not use * from the theme modules, they define a `main` function
Now that the `alias` command became less powerful,
there is no good way to disable the prompt globally anymore.
This commit fixes it by using an environment variable `CONDA_NO_PROMPT` instead.
updating the environment with closures should not
be done with `insert` because `insert` will call
a closure if it gets one as input, `merge` will not
Co-authored-by: Benoît Sierro <benoit.sierro@bluewin.ch>
* Create to-ini.nu
Nushell doesn't have a builtin serializer for ini files and I needed it for awscli profiles so here it is.
* moved to formats subdir
---------
Co-authored-by: Yethal <nosuchemail@email.com>
* remove the `pi` and `e` constants
This commit mitigates the following error
```bash
> use maths/math_functions.nu
Error: nu::parser::expected_keyword (link)
× Expected keyword.
╭─[maths/math_functions.nu:38:1]
38 │ ## constants
39 │ let pi = 3.1415926535897932
· ─┬─
· ╰── expected def or export keyword
40 │ let e = 2.7182818284590452
╰────
```
One can use the new `math pi` and `math e` instead.
* switch from `for` to `each` in pipelines
This commit mitigates the following error
```bash
> use maths/math_functions.nu
Error: nu::parser::unexpected_keyword (link)
× Statement used in pipeline.
╭─[maths/math_functions.nu:154:1]
154 │
155 │ for $i in 0..($n_cols - 1) {
· ─┬─
· ╰── not allowed in pipeline
156 │ ($x | column2 $i) | scale-minmax $a $b | wrap ($name_cols | get $i)
╰────
help: 'for' keyword is not allowed in
pipeline. Use 'for' by itself,
outside of a pipeline.
```
* add a `export` to all the `def`s in `maths/math_functions.nu`
* remove `sin`, `cos` and `ln` as they are built-in
* use `math e` to make `math exp` pure `nushell`