Path to this page:
Subject: CVS commit: pkgsrc/shells/nushell
From: pin
Date: 2023-04-27 09:16:17
Message id: 20230427071617.C4A72FA87@cvs.NetBSD.org
Log Message:
shells/nushell: update to 0.79.0
Themes of this release / New features
- Standard library (@amtoine, @bobhy, @fdncred, @presidento, ...)
This is it. We finally release the standard library with this 0.79!
It's been on the mind of the core team of Nushell for some time and it was
made real between the two releases.
But first of all... what is the standard library?
The nushell standard library is a collection of nushell scripts that are
automatically loaded in the nushell binary and reachable via the use command
without any additional setup.
Note: some of the commands from the standard library are used without human
intervention as part of what we call the prelude.
As said above, the other commands are available with the use command.
The goal of this library is, as its name suggests, to provide a standard
experience and a standardized set of commands and tools to any Nushell user.
In std, one can find things like:
- a test framework to write robust Nushell scripts, modules and libraries
- implementation of builtin commands once written in rust
- logging commands with several log levels
- ...
Note: yes, you heard right, in the future, the standard library might become
a sanctuary for non-time-critical commands that were once written in rust as
part of the built-in set of commands!
Right now, we are actively trying to move the help commands from the nushell
core implementation to the library.
With this release, the library comes with the following custom commands:
std assert, std dirs, std help, std iter, std log and xml module
See https://www.nushell.sh/blog/2023-04-25-nushell_0_79.html for a
description of these and a list of available sub-commands.
some other commands live under the std namespace, without any module: clip,
path add and run-tests.
- TL;DR
As there has been quite a lot of contributions already (see the 50 closed
PRs at the time i'm writing this), i'm just gonna give some hints and links
in this release note, leaving the rest to the amazing work of other
contributors who wrote parts of the lib and its documents
(shout out to @bobhy, @fdncred and @presidento)
- the library can be used and tested with or use direct imports, such as
use std dirs
- one can follow the activity of the library in the roadmap
- the library comes with a test framework; see the Testing your Nushell code
chapter of the book
- the long term information, changelog and updates shall be found in the
Standard library chapter of the Nushell book
- if you are a contributor willing to help out, everything happens in the
nu-std crate, especially the CONTRIBUTING.md document which explains all
there is to know about "developing with std" in great details.
If, for some reason, you want to load Nushell without the standard library,
start nu with the --no-std-lib. This can be the case if you find the startup
times much longer than before. We're aiming to improve the loading speed
in the future.
- enhanced IDE support in our VS code extension (JT, fdncred)
Nushell now has a first LSP (Language Server Protocol) implementation with a
VSCode integration. If you install the latest version of our VSCode plugin,
you'll see hovers, inlays, tooltips, error squigglies and other features.
We are still very early in the LSP development, but the extension is already
very usable and definitely moves the experience of writing Nu code to another
level!
While currently we have only VSCode integration, the server itself is
standalone and we welcome projects adding the LSP support to more editors.
- atuin now supports Nushell
Thanks to @stevenxxiu you can now use atuin with Nushell. We are happy to see
Nushell supported by more projects and we welcome PRs adding more
integrations.
- Relaxed parsing rules (JT)
We listened to your feedback around the syntax changes introduced with 0.78
and decided to revert to the old behavior around the parsing rules for
numeric literals as well as the compulsory || for closures.
- Removed old alias implementation (kubouch)
While there are still some missing pieces, we removed the old alias
implementation. This means that old-alias is no longer available. We decided
to remove it to clean up the code. It makes further fixes to aliases easier
as you do not need to remember which alias implementation a piece of code
belongs to.
There are two notable missing features from the old aliases:
- Missing completions with external completers.
- Most parser keywords (such as source) cannot be aliased but adding support
for aliasing them should be possible in most cases.
- Not possible to alias with environment shorthands
(e.g., alias foo = FOO=bar spam)
- Some presentation issues, such as the output of which and the alias usage
pointing at the aliased call instead of the alias itself.
- Changes to default files locations (ito-hiroki)
$nu.config-path and $nu.env-path are now set based on --config
and --env-config flags passed to Nushell and also use the path after
resolving symlinks. This means that they no longer guarantee pointing at the
default Nushell's config directory. To be able to refere to the default
config directory, $nu.default-config-dir was added and used in default env.nu
to always point NU_LIB_DIRS to the scripts directory under the default config
directory.
Related to that, $env.CURRENT_FILE was added to be able to show the currently
evaluated file.
- Breaking changes
#8797 old-alias is no longer available
#8724 str index-of -r now uses ranges
#8792 config nu and config env now open $nu.config-path and $nu.env-path,
respectively.
#8779 Aliasing math expressions now shows error immediately instead of
failing silently and showing a confusing error later.
#8917 exec inherits Nushell's environment variables
#8887 NU_LIB_DIRS definition in env.nu changed
Files: