1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-02 23:27:45 +00:00
Commit graph

1194 commits

Author SHA1 Message Date
Tilen Gimpelj
e5e171c3aa
Support unnamed conda envs (#439)
* Fixed support for env files

* added autocomplete support

* Update virtual_environments/conda.nu

Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>

* Reverted commit 4d460eb

---------

Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
2023-04-06 12:39:15 +01:00
fj0r
d8db82c6c9
upgrade to 0.78: git, ssh, docker, kubernetes (#438)
Co-authored-by: agent <agent@nuc>
2023-04-06 08:01:03 +02:00
Antoine Stevan
b9ec76b493
rewrite the theme generation (#437)
* 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`
2023-04-05 12:52:15 -05:00
fj0r
d7cdfdba4e
add parameters default value to just's completion and j for shortcut (#435)
* add parameters default value to just's completion and `j` for shortcut

* fix just hasn't args

---------

Co-authored-by: agent <agent@nuc>
2023-04-03 14:26:59 -05:00
Darren Schroeder
b7a45fbcca
replace occurences of str collect with str join (#436) 2023-04-03 08:47:25 -05:00
WindSoilder
2cc5b58209
Replace str join with str collect (#434)
`str collect` is deprecated.
2023-04-03 09:07:55 +01:00
JT
7bff42fd29
Update TWiN and since last release to 0.78 (#433) 2023-04-02 19:33:52 +02:00
Lukáš Veškrna
aaf0c1d0f5
Removed math exp, it is now built-in (#432) 2023-04-01 17:43:46 +02:00
ankitgahlyan
5bf997b222
typo (#431) 2023-04-01 07:33:56 -05:00
Darren Schroeder
7b6fa05907
update to new nushell syntax (#430) 2023-03-31 12:39:26 -05:00
Darren Schroeder
4f2263447f
update script syntax to match the latest nushell (#429) 2023-03-31 07:39:20 -05:00
Michał Borejszo
a0c1314dd0
gpsup, glo, git_current_branch (#426) 2023-03-29 16:18:18 -05:00
Darren Schroeder
d1a7dbab68
Update CODEOWNERS (#428)
remove core-team from codeowners to see what happens
2023-03-29 16:07:55 -05:00
sgasse
9f480c470f
custom-completions: git: Expand completions (#407)
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>
2023-03-29 06:42:19 -05:00
Michał Borejszo
26572b28a8
add gmom alias (#425) 2023-03-29 06:40:22 -05:00
WindSoilder
26e10f47b8
fix conda script (#424) 2023-03-29 06:46:34 +02:00
Hofer-Julian
d984ff61aa
Add CODEOWNERS file (#419)
* 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
2023-03-23 07:33:23 -05:00
fj0r
e7976c5cc1
dp for docker ps support docker and podman (#421)
* dp for `docker ps` support docker and podman

* dp for `docker ps` support nerdctl

---------

Co-authored-by: agent <agent@nuc>
2023-03-23 06:50:39 -05:00
David Lattimore
1884426d79
git-completions: Add completions for more subcommands (#420)
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.
2023-03-21 07:37:08 -05:00
Antoine Stevan
b5b7ae1410
FIX: define a main function to use the themes modules (#402)
* 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
2023-03-20 08:51:14 -05:00
Hofer-Julian
7c28a4f6c3
conda: Disable prompt via env var instead of flag (#417)
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.
2023-03-19 14:11:25 -05:00
Stefan Holderbach
6ec94a84b5
Fix since_last_release.nu script (#385)
Missed update of fetch to `http get`
2023-03-18 23:42:57 +01:00
Darren Schroeder
00b0039653
updated some scripts to support the latest changes in 0.77.1 (#416) 2023-03-16 18:00:25 -05:00
fj0r
2024d52938
upgrade to nu 0.77 (#413)
* auto detect docker cli

* rename just to main

* upgrade ssh

* upgrade kubernetes

* upgrade nvim.nu

* upgrade git

* rename index-need-update to ensure-index

* new command `after`

---------

Co-authored-by: agent <agent@nuc>
2023-03-15 08:29:32 -05:00
Jakub Žádník
10bde0657d
Fix since last release script (#412) 2023-03-14 23:11:25 +02:00
Stefan Holderbach
18deb3d7d1
Add nu-cmd-lang to nu_release.nu (#411)
We need to reflect the cratification of `nu-command`
2023-03-14 19:40:55 +01:00
Tilen Gimpelj
e95f60971b
Updated conda script to default to base if no arg given (#409) 2023-03-13 09:21:21 -05:00
Chris Dawkins
34235efe5f
Replace deprecated str collect command (#410) 2023-03-12 17:17:33 -05:00
Darren Schroeder
06dd1258c3
Revert "conda activate base if env_name not given (#400)" (#408)
This reverts commit cfbe99d3fb.
2023-03-12 08:13:09 -05:00
sgasse
471c81c5ff
custom-completions: git: Add git rebase (#404)
Co-authored-by: Simon Gasse <sgasse@users.noreply.github.com>
2023-03-12 12:22:52 +01:00
Jan Klass
e3b02b38ee
Fix docs typo in job.nu (#405) 2023-03-12 10:35:45 +01:00
Tilen Gimpelj
9598815911
Added Wordle game (#403)
* initial commit

* wordle game
2023-03-11 09:45:02 -06:00
Martijn Visser
cfbe99d3fb
conda activate base if env_name not given (#400)
This matches conda behavior.
2023-03-09 08:02:14 -06:00
dedebenui
2f142406d3
changed insert to merge (#399)
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>
2023-03-08 06:42:58 -06:00
chtenb
bc71f8d1e9
Make commands optional (#398) 2023-03-05 14:45:19 -06:00
Darren Schroeder
0985500ec9
update scripts that use benchmark to timeit command (#397) 2023-03-02 16:05:27 -06:00
Darren Schroeder
a58de70dd8
update str lpad str rpad to fill (#396) 2023-03-02 15:54:42 -06:00
WindSoilder
64f1cb75ec
fix conda script (#395) 2023-03-02 08:53:40 -06:00
Jingyu
abbb48196e
FIX kubernetes.nu since str lpad and str rpad are deprecated (#394) 2023-02-27 19:34:14 -08:00
Yethal
0e6168bf7c
Add parsers for cpuinfo and dmidecode (#393)
* Add parsers for cpuinfo and dmidecode

* newlines

---------

Co-authored-by: Yethal <nosuchemail@email.com>
2023-02-27 12:22:23 -06:00
Kinchkun
a8e6ea2923
job.nu: update view source usage (#392)
Co-authored-by: Kinch <kinchdeadalus@gmail.com>
2023-02-23 09:28:56 -06:00
baehyunsol
3b89c26a3f
make up.nu much simpler (#391)
Now nu supports String multiplications!
2023-02-23 08:53:55 -06:00
baehyunsol
d21cdfc0a5
remove build-string, which is deprecated (#390) 2023-02-23 08:43:22 -06:00
Darren Schroeder
c3462c3a0b
updates for new dfr names (#389) 2023-02-22 12:54:55 -06:00
Darren Schroeder
76bd8b3410
rename misc (#388) 2023-02-22 08:07:58 -06:00
Yethal
21d40d7318
Create to-ini.nu (#386)
* 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>
2023-02-22 07:30:25 -06:00
Darren Schroeder
4a0f59265d
fix text where comments don't have spaces (#387) 2023-02-22 07:13:10 -06:00
Stefan Holderbach
691b666dc5
Update release script to nu_plugin_formats (#384)
Also no need to sleep
2023-02-21 23:06:49 +01:00
Antoine Stevan
fa5f262a5c
FIX: the math functions can not be used (#381)
* 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.
```
2023-02-18 13:19:55 -06:00
Antoine Stevan
274464369f
FEATURE: export all the math functions to use them in nushell (#382)
* 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`
2023-02-18 09:50:38 -06:00