Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port before_v0.60/config_management before_v0.60/language before_v0.60/prompt before_v0.60/tests #851

Merged

Conversation

39555
Copy link
Contributor

@39555 39555 commented May 26, 2024

This PR is part of porting all old scripts #221 and includes a set of modules:

  • config_management
  • language
  • tests
  • prompt

12 files changed

config_management

This module was removed, because it was related to the old config.toml format

  1. README.md: removed
  2. config.toml: removed
  3. startup.nu: removed

language

  1. playground.nu : unchanged because this is just source ...
  2. std.nu : unchanged because this is just source ...
  3. playground/lib.nu -> playground/mod.nu and all commands have been exported
  4. std/date.nu + export keyword

tests

This module contained only the usage of language module, so I merged it with language
8. tests/language/std/date.nu -> modules/language/tests/date.nu
9. main.nu: removed because it was just source date.nu

prompt

  1. git_status_prompt.nu -> modules/git_status_prompt.nu + export keyword
  2. left_and_right_prompt.nu -> modules/left_and_right_prompt.nu + export keyword
  3. README.md : has been removed as a duplicate of modules/prompt/README.md

39555 added 12 commits May 26, 2024 17:35
`playground/lib.nu`
- `str collect` -> `str join`
- `$nu.env | default ...` -> `$env | get -i ... | default`
- `$false` -> `false`
- `block` -> `closure`
- explicit print
- `if {} {}` -> `if {} else {}`
- `each {} | all?` -> all {}
- remove strange missing `$title`, add `$topic` argument
- add `any` -> `list<any>`
- move `length == length` first, then `zip`
- `zip | pivot` -> `zip`

`std/date.nu`
- `date format` -> `format date`
This is not necessary anymore because nu already has `config env` and `config nu` commands and no longer uses the config.toml format
- remove `main.nu`, there was only `source date.nu`
- adjust script for `playgroud/lib`
…ced` to `modules/prompt`

merge with the existing `prompt` module

- Remove the old README.md
add `export` keyword for:

- `def git-status-prompt` in `git_status_prompt.nu`
- `def construct_prompt` in `left_and_right_prompt.nu`
- change `source` -> `use` in `tests/date`
@fdncred fdncred merged commit 9d399d8 into nushell:main May 26, 2024
1 check failed
@fdncred
Copy link
Collaborator

fdncred commented May 26, 2024

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants