Commit Graph

820 Commits

Author SHA1 Message Date
Darren Schroeder
92b29131db
some cleanup (#463) 2023-04-25 18:01:27 -05:00
Mel Massadian
c47ccd42b8
refactor: (#418)
* refactor:  move in one commit

Eveything in modules should probably be changed to `exported` defs.
The idea is to move everything first to keep proper history.

* refactor: 📝 add modules readme (wip)

* refactor:  small move

* refactor: 📝 changed nestring, updated modules readme

* refactor: 📝 to document or not to document

* fix: 🐛 themes

replaced the template to use `main` and regenerated them
from lemnos themes.

* Revert "fix: 🐛 themes"

This reverts commit 4918d3633c.

* refactor:  introduce sourced

- Created a source `root` in which sourcable demos are stored.
  Some might get converted to modules later on.
- Moved some files to bin too.

* fix: 🐛 fehbg.nu

* fix: 🐛 modules/after.nu

* moved some other stuff around

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-04-25 17:56:25 -05:00
Stefan Holderbach
382696cd21
Include nu-std in the release script (#462)
Only `nu` directly depends on it, so can be part of last wave.
2023-04-25 20:45:35 +02:00
fj0r
e8cda90b52
prompt powerline suppor color theme (#461)
* rename NU_MENU_MARKER to NU_POWER_MENU_MARKER

* PROMPT_INDICATOR fallback

* refactor _sep -> decorator

* support color theme

* source return `$nothing` for hiding

* '<<' not longer hide separator

* refactor

---------

Co-authored-by: nash <nash@iffy.me>
Co-authored-by: agent <agent@nuc>
2023-04-25 06:11:08 -05:00
fj0r
0403e8ebf3
refactor: unified configuration environment variables (#460)
* refactor: unified configuration environment variables

* upgrade README.md

---------

Co-authored-by: nash <nash@iffy.me>
2023-04-24 08:24:08 -05:00
fj0r
cb61fe50ec
prompt (#455)
* optimize git status parsing

* improve `-v` for dr(docker run), remove dx

* rename relative-to-pwd to host-path

* optimize git status branch's parsing

* typo

* git rerange glg -> gl, gl -> gpl, gp -> gps

* fix `env already a builtin variable`, revert #fb52413

* get git_status from gstat

* prompt: rerange formatter

* parsing git_status without gstat

* refactor `light_yellow pipe` to `sep`

* fix parsing when not in git repo

* refactor with Optional cell path members

* adjust `ansi reset` location

* typo

* tweak nvim config to be more generic

* prompt: powerline mode

* format

* rename prompt/git-k8s.nu to prompt/power.nu

* use `ansi -e {bg}` instead of string interpolation

* format

* power prompt: insert _sep at prompt generator

* tweaked powerline colorscheme

* update up_prompt

* add $env.NU_UPPROMPT

* tweak time_segment color

* add $env.NU_PROMPT_SCHEMA

* up_prompt fill length must greater than 0

* add fallback theme for NU_PROMPT_SCHEMA has many elements

* merge NU_POWERLINE_THEME into NU_PROMPT_SCHEMA

* helper: default_env

* typo

* try to optimize performance

* optimize performance

* add a space to PROMPT_INDICATO

* replace menus.marker

* modularized

* new dir `powerline` with README

* doc: define NU_PROMPT_SCHEMA

* hook env change

* more doc

* safely replace menus.marker

* avoid `power init` when hooks env_change

* update todo

* refactor export

* tweak MENU_MARKER_SCHEMA

* move to prompt/powerline

---------

Co-authored-by: agent <agent@nuc>
Co-authored-by: nash <nash@iffy.me>
2023-04-24 07:26:33 -05:00
Darkness9724
44de28100d
Fix wolframalpha.nu (#459)
Signed-off-by: Maxim Mikhailov <darkness9724@gmail.com>
2023-04-23 14:07:59 -05:00
Rick Cogley
bfa41311ea
Enhance by getting length of symbol string (#458)
The get-random-symbol function had a hard coded upper limit when using
"random integer". Switch to getting the length of the symbol string
automatically, so user does not have to physically count
2023-04-23 06:45:56 -05:00
Rick Cogley
822005fca6
Add nupass.nu password generator (#450) 2023-04-22 21:02:49 -05:00
Darren Schroeder
97fac19e33
update progress meter to work with latest nushell (#457) 2023-04-22 07:15:05 -05:00
Darren Schroeder
1330bdd865
update sg.nu to print again (#456) 2023-04-21 14:24:17 -05:00
nils-degroot
1d16a376b2
Added completions for pass (#454) 2023-04-20 08:12:48 -05:00
D3V1LC0D3R
4157914f71
Update nuschiit.nu (used deprecated fetch) (#453)
updated the script to no longer use fetch and properly trim strings
2023-04-19 11:38:41 -05:00
D3V1LC0D3R
a49b6c5f0e
Create anagram_unscramble_scrape (#452)
parse anagrams into table from unscramble.me
2023-04-19 10:09:35 -05:00
TuffenDuffen
e4784d44a3
fixed error in yarn completions (#451) 2023-04-18 07:02:04 -05:00
Darren Schroeder
2a61134e2f
some fun iterm2 drawing (#449) 2023-04-16 07:47:27 -05:00
Darren Schroeder
87655ab380
update range syntax in str substring usage (#448) 2023-04-16 07:15:37 -05:00
Hofer-Julian
2d12532495
Add || to closure (#447)
Not necessary anymore for the next release, but fixes things for the current one
2023-04-14 13:42:12 +02:00
Darren Schroeder
cc894d2b7a
Update fehbg.nu
fix variables
2023-04-13 08:55:50 -05:00
fnuttens
5f463775f5
add --all aliases for exa (#446) 2023-04-12 09:24:13 -05:00
Darren Schroeder
52e37dcd18
move assets so they're more accessible (#445) 2023-04-12 08:29:47 -05:00
Darren Schroeder
40ad482307
a little cleanup (#444) 2023-04-12 08:27:23 -05:00
Jan Klass
40459e646d
Fix winget-completions.nu for nushell v0.78 closure syntax change (#443) 2023-04-11 13:52:33 -05:00
Hofer-Julian
c6b3ecf21c
Speeding up activating conda environment (#442)
* Speeding up activating conda environment

That is mostly done by caching the expensive `conda info --envs --json` call

* Formatting
2023-04-11 13:59:04 +02:00
Darren Schroeder
ebdab3dea3
fix some quoting bugs that the lsp found (#441) 2023-04-07 15:08:02 -05:00
fnuttens
d78ee5eaa7
add exa aliases (#440) 2023-04-06 06:55:40 -05:00
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