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
|
Log message:
shells/nushell: update to 0.76.0
Debugging
We've added a few new commands to help with nushell debugging.
- ast - The ast command works the same as before and produces an ast for any
pipeline you give it.
- debug - The debug command works the same as before and produces some
output about nushell values.
- explain - Provides detailed information about pipeline contents in a
closure
The explain command attempts to explain to you how the pipeline, in the passed
in block, is going to be interpreted. It shows the pipeline and command index,
the looked up and found command name, the command argument data type, and
argument details, among other things. Note that spans are also included and can
be used with view span.
- inspect - Immediately prints out the contents of a pipeline
The purpose of the inspect command is to help to debug pipelines. It works by
allowing you to inject the inspect command into a pipeline at any point. Then it
shows you what the input description is and what the input values are that are
passed into inspect. With each step it prints this information out while also
passing the value information on to the next step in the pipeline.
- metadata - The metadata command works the same as before.
- profile - Recursively profile pipelines and pipeline elements within a
closure.
Enables fine-grained profiling of individual pipeline elements and recursively
stepping into blocks/closures. The recursion depth can be controlled (default is
1) and it can optionally collect the profiled source segments for easier
orientation and value in each step for easier debugging.
Note: There are known limitations that the profiler can't run. For example, it
can't collect data from subexpressions and loop iterations. It is caused by
profiling data being collected as pipeline metadata and a known bug that
pipeline metadata is not preserved in some cases.
- timeit (formerly known as benchmark, same functionality)
- view files - Lists source code inputs loaded into Nushell since the beginning
of the session
view files lists the files and entries loaded into nushell's EngineState memory.
Note the spans, for use with view span and the size of each file's contents
stored.
- view source (formerly known as view-source, same functionality)
- view span - View contents of a span
Spans are important to nushell. One of their uses is to show where errors are.
For instance, in this example below, the leader lines pointing to parts of the
command line are able to point to 10, /, and "bob" because each of \
those items
have a span.
In an effort to have a little more organization, we've assigned a category of
Debug to all commands that participate in nushell script debugging.
Here is a list of commands that are in that category now.
-ast
-debug
-explain
-inspect
-metadata
-profile
-timeit
-view
-view files
-view source
-view span
- "Multiplication" of strings and lists is now supported. (WindSoilder)
Like in Python you can now use the multiplication operator * to create n
concatenated copies of a string or list. Here n has to be an int value.
This can be useful if you want to quickly build ASCII art 😃!
Note that the operation is commutative.
- Dataframe commands are again explicitly separated from core nushell
commands. (#7998)
- Dataframe commands have all been renamed in order to avoid confusion with
nushell commands. It also makes our help commands less confusing.
For instance, you can now do help select and understand how to use the
traditional nushell select command and you can do help dfr select and
understand how to use the dataframe specific select command. Previously this
was a source of cryptic error messages that were confusing to users.
-PATH vs Path (#8003)
We fixed a PATH vs. Path bug in completions, so now you should be able to do
commands like cod<tab> and get completions like code and code.cmd across all
operating systems.
- More commands become plugins and plugins get first-class help support
(WindSoilder, #7984, #7942)
In an effort to both make the core nushell binary smaller and to improve our
plugins system along the way we moved the commands for several less common
file formats to nu_plugin_formats.
To make sure you still have a first-class experience while using these commands,
our plugins can now support code examples in the help and F1 menu.
As a result, plugin authors need to slightly update their command Signature to
PluginSignature which supports the examples and recompile.
- Improved error messages for int and string literals
Nushell now gives more specific and helpful messages when it detects syntax
errors. In this release we've improved errors for string and int literals but
we hope to improve more in the future. #7952
Errors in the format of escapes within double-quoted strings are reported
specifically.
Invalid digits in radix-prefixed int literals are now flagged as a specific
error. The old parser treated these invalid ints as bare strings.
- General housekeeping in the Nu codebase (Hofer-Julian, fdncred, rgwood,
sholderbach)
We are very lucky that we recently had a number of new contributors starting
to help out with bug fixes and improvements to Nushell. We want to thank you
and want to welcome you all!
In the background a number of contributors spent some time improving and
refactoring the codebase to get us up-to-date and make it more approachable for
newcomers. This includes work to break up less readable code in important
places, and a significant effort to get us up-to-speed on some coding standards.
We also updated a number of dependencies and want to continue to improve our
dependency tree. We recently enlisted the relentless help of the dependabot.
Furthermore, we enabled rudimentary tracking of test coverage through
codecov.io. This should help us identify areas were additional tests are needed
and can be a great contribution to the project.
- Breaking changes
- load-env can not accidentally set $env.PWD anymore (#7963)
- The --numbered flag to enumerate entries has been removed from each, par-each,
each while, and reduce. Use the enumerate command added in 0.75 instead. (#7777)
- Plugin system: nu_plugin::Plugin::signature has changed from fn
signature(&self) -> Vec<Signature> to fn signature(&self) ->
Vec<PluginSignature> to support examples on plugin commands. Plugin \
authors have
to update the relative structure to apply these changes. Normally you just need
to perform a global search/replace from Signature to PluginSignature, then
rebuild and run with the latest nushell version. (#7984)
- benchmark renamed to timeit (#8018)
- dataframe commands renamed with a prefix of dfr (#7998)
- view-source renamed to view source (#7989)
- Plugin commands can now include examples, which necessitated a change to the
plugin signature, which causes all plugins to need to be recompiled for use.
(#7984)
- str lpad and str rpad have been superceeded by fill in order to provide
alignment (7846)
- from ini, from vcf, from ics, from eml commands are moved to plugin called
nu_plugin_formats to reduce the number of commands in nushell core, you need to
install and register the plugin manually to use these command. (#7942)
- http get -t,--timeout parameter is now -m,--max-time (8088)
- Filesystem commands now print to stderr when using --verbose flag (8014)
- The parse command will now create 0 indexed columns instead of 1 indexed
(7897)
|
Log message:
shells/nushell: update to 0.74.0
0.74.0
Themes of this release / New features
- Known externals commands and exec now have "fall-through" signatures
(merelymyself, WindSoilder, kubouch). A common pitfall in Nushell when
defining custom signatures using extern used to be that unrecognized
arguments passed to the command would throw an error. Now, arguments are
still checked against the extern signature but those that are not recognized
are simply ignored.
exec uses similar style which fixes errors with tools like ssh and gdb that
internally invoke exec.
- help is now more helpful (kubouch). For a long time, Nushell had the option
to provide custom help messages for commands via comments.
In this release, we allow user-defined help messages with aliases and
modules. This goes hand-in-hand with a handful of new help subcommands to
explore these help messages. The help messages now also treat the first line
followed by an empty line as a "brief" description displayed in summary
tables generated by help commands, $nu.scope.aliases, etc. The full
description is available when querying a particular command/alias/module
(e.g., help spam). This brief vs. full separation was already present for
built-in commands, like path, but now it is applied also to all user-defined
help messages. The current batch of improvements can still be taken further.
For example, custom help messages could possibly be defined also for
variables and environment variables (via comments adjacent to let and
let-env). We could also further improve the presentation of existing help
xxx commands.
- nitial support for parse-time constants (kubouch). This is a
proof-of-concept that we plan to expand in the future. Tip: We also addedd a
new book section with an in-depth explanation of Nushell's parsing and
evaluation, hopefully clearing up some confusion about things like
"Why can't I source a dynamic path?". It also touches on the concept of
parse-time constants. A new const keyword is added to Nushell to define
"parse-time" constants. Constants defined with const behave the same as
variables defined with let, but in addition, they are usable in some
contexts that require values known at parse-time. Currently, this applies
to files or names passed to use, overlay use, source, and source-env.
Only a limited subset of values is allowed to be a constant. In general,
"simple" values, like strings or integers, and their collections (lists,
records) are allowed but values requiring some evaluation (string
interpolation, subexpressions, environment variables) are not allowed.
The current selection is not set in stone, however, and might change in
the future.
Some future direction we can take this:
- Move parts of $nu to be constant to allow things like source
$nu.config-path
- Allow modules to have constants (module spam { const CONTENTS =
[ 'eggs', 'bacon', 'sausage', 'spam' ] })
- Some limited form of parse-time evaluation to allow static control flow
In general, we want to be very conservative with parse-time constants and
evaluation because it can be easy to introduce awkward side-effects and
performance pitfalls. We plan to extend this only where it brings some
tangible benefit to Nushell's user experience.
- New url encode command to percent-encode URLs (MehulG). To encode text that
is used as a path component in a URL we now provide url encode. By default
it preserves the structure of a URL and only replaces invalid characters.
With --all the whole string gets encoded.
- values command to programmatically interact with records (webbedspace).
This is a complement to columns, designed to allow the values of a record
to be easily filtered and iterated over using the standard list tools like
each and where. The name values is derived from similar functions in Ruby,
Python and JavaScript. It can also operate on tables to convert them to
lists-of-lists.
- get, select, cell path access on tables will now error when encountering
a hole (kubouch, webbedspace). Formerly, this would produce ['bar', null] -
converting the table hole into a null. Now, however, they will produce an
error. The original null-conversion behaviour can, as usual, be opted into
using the -i flag for get and select: [{foo: 'bar'}, {}] | get -i foo
produces ['bar', null]. (There are also plans for a future version of
Nushell to expand the cell path syntax to allow certain cell names to be
"nullable" - converted to null if they don't exist.).
- Behavior of -i/--ignore-errors flag for get and select when the entire
column is absent has changed. Formerly, if select -i or get -i couldn't find
any value for the given column, it would produce a single null. This has
been changed so that it now produces a table (or, in the case of get, a
list) of all nulls. This change was made to make this flag work more
consistently with default and compact.
- Certain misused punctuation in def definitions are now errors (webbedspace).
The following misuses of punctuation in def definitions now produce errors:
- Placing a comma between a long flag and its short alternative (e.g. def
a [--foo, (-f)] {})
- Consecutive commas, like def a [foo,,bar] {}
- Consecutive colons, like def a [foo::int] {}
- Using ^ in command names, like def ^a [] {}
- $in now works in catch closures.
$in in catch closures now behaves identically to how it does in other
closures, like those given to each (it's equivalent to what would be the
first named argument).
try { 'x' | math abs } catch { print $in } behaves the same as try
{ 'x' | math abs } catch {|e| print $e }.
- MIME-types are supported in ls with an additional flag. (fdncred). To find
out what application your operating system associates with a particular
file, you can now use the --mime-type or -m flag on our ls command.
This simplifies filtering for particular files and can help you dispatch
files to particular programs. When opening files with Nushell directly,
open will still follow the same heuristics using file endings and the
built-in from ... command parsers.
- Regular expression queries are cached for performance (rgwood). The primary
motivation for this is to make regex and =~ operator uses in hooks and
color_config closures more performant.
- All built-in commands now declare their pipeline input and output types
(sholderbach). A few releases back commands internally got the capability
to declare not only the types of parameters but also pairs for the input
and output on the pipeline. With this release we finally declare those
input and output types for all core nushell commands. This can help you as
user to see what a command expects from the pipeline and might return. We
are exploring how nushell can leverage that for more useful diagnostics
and completions. In the future we may introduce syntax for user-defined
commands to declare their input and output types explicitly.
- Breaking changes
- get and select now error when encountering a hole
- the behaviour of -i on get and select has changed columns will now error
for data that is not a table or a record (#7593)
- The dataframe specific command fill-na has been renamed to fill-nan to
better represent its capabilities (#7565)
- The requirements for the names of a nu command and a command alias have
been tightened to avoid some problems (#7392)
- to toml will only produce output for records now as the output for tables
is ambiguous and may be invalid to parse (#7597)
- exec and known externals don't throw errors when unknowns parameters are
passed to them
- help command has been thoroughly refactored and includes several more
subcommands. help <word> now matches commands, aliases, and modules.
- command names in help commands and $nu.scope.commands are displayed
correctly if they were imported from a module with a prefix
- hide command no longer hides environment variables. Use hide-env instead.
(#7687)
- math eval has been removed in favour of the direct math commands and
expressions (see help operators as well) (#7284)
- last, skip, drop, take until, take while, skip until, skip while, where,
reverse, shuffle, and sort-by are now stricter about which types of data
they accept (#7623)
0.73.0
Themes of this release / New features
PLEASE NOTE: Boolean && and || have changed
- The boolean && is now and and the boolean || is now or. These were \
deprecated
in the 0.72 release and have now been removed. Existing scripts will need to
be updated to the new syntax to run in 0.73.
- Experimental interactive explore command (zhiburt). This release includes a
new experimental command called explore for viewing Nu data in an
interactive UI. Some things to try:
- pipe a large table to explore (ex: ls | explore) and use explore as a
fancy pager
- run explore, then type :try and press the Enter key to enter a mode where
you can run commands inside explore
explore is highly experimental and we expect it to change in the future.
Please report any issues you discover.
- New math commands (sholderbach). With this release we include a larger number
of math commands for real valued math such as trigonometric functions and
logarithms. The goal is to remove the math eval command that operates on
strings instead of proper nushell expressions.
- Changes to commands with predicates (kubouch). any, all, skip until,
skip while, take until, and take while now accept a closure instead of a row
condition. This makes them slightly more verbose but it is a part of an
effort to refactor our parser to allow defining concrete grammar rules for
the Nu language. Row condition is currently accepted only in the where
command which becomes a parser built-in command (like use or let).
- New filter command and simpler where (kubouch). We found the -b flag of
where quite confusing and decided to remove it in favor of a new filter
command. Both filter and where have similar functionality but where now only
accepts a row condition and filter accepts a closure. Why is it useful to
have two commands doing the same thing? Because with the filter command,
you can store the closure in a variable. On the other hand, where is more
concise ([{a: 1} {a: 2}] | where a > 1) but you can't store its condition in
a variable. The choice is yours!
- New command uniq-by (raccmonteiro). To complement uniq which can identify
unique or duplicated values in a collection or report the number of
occurrences for a particular entry, we now have uniq-by. It supports
filtering a table by entries appearing in a particular column.
- Mutable data structures can now have their inner values mutated using
= (webbedspace). If a variable has been defined as mutable using the
recently-added mut keyword, you can now deeply mutate its inner values
using =. This syntax enhancement was added primarily to make modifying
$env.config during a normal session much easier. Now, $env.config is
considered inherently mutable. You can change a single config value.
- More sophisticated coloring of data values using closures (webbedspace).
The color_config config record has new functionality: instead of specifying
a single color name for all values of a given type, you may now alternatively
provide a closure that dynamically computes a color for each individual
value. The closure takes, as input, a single value of the given type, and
must produce either a string value representing a color, or a
{ fg, bg, attr } record (the same as what color_config already accepts as a
color value). This feature can be used to provide important visual
distinctions between ranges of values in data.
This causes all filesize values to be colored using dark_gray if they equal
0b, cyan_bold if they are less than 1mb, and blue_bold otherwise. This means
that, in ls output, empty files can be more easily distinguished from
non-empty ones. This colors true in light_cyan, and false in light_gray.
This can be useful when browsing a large table of booleans. The themes in
the default config.nu file have been updated with further examples of these
closures.
In certain situations (most notably, during a single ls call that isn't
piped to anything else) Nushell will parallelize the execution of these
closures. As such, you cannot expect that they will run in the same order
as each value appears in the output data.
WARNING
Currently, closures are only supported for output values - they do not work
with color settings that begin with shape_, such as shape_literal. They also
do not work with the color configuration for the new explore command. Only
values inside of tables are highlighted using closures.
Breaking Changes
- split row command will retain an empty string if splitted string is empty.
(#7413)
- split list now properly removes the separator in all positions (#7355)
- The --show-created-paths flag has been replaced by --verbose from mkdir.
- fetch removes --output, --bin, --append flags, use fetch with save to save
fetched page to a file. (#7468)
- changes to how get works with deep cell paths (#7480)
- mkdir's -s/--show-created-paths has been renamed to -v/--verbose for better
consistency (#7462)
- && is now and and || is now or
- any, all, skip until, skip while, take until, take while now take only a
closure as an argument.
- where now takes only row condition argument, -b flag removed.
0.72.1
- This is the 0.72.1 release of Nushell. It is a hotfix release of 0.72.0 that
changes how the Ubuntu release binary is built so that it does not change
glibc versions.
0.72.0
Today, we're releasing version 0.72 of Nu. This release includes many new
features: mutability, looping, early returns, changes to the core commands,
and much more.
NOTE: as part of this release, we are no longer including additional features
in --features=extra. With 0.72, SQLite features have moved into the main
Nushell installation and dataframe functionality is now part of
--features=dataframe.
As part of this release, we also publish a set of optional plugins you can
install and use with Nu. To install, use cargo install nu_plugin_<plugin name>.
Themes of this release / New features
- Try/catch
Starting with 0.72, it's now much easier to run a command that might fail
and then handle the failure if it happens.
The catch part of the try/catch is optional. Without it, the try block will
run, and any error that occurs will be ignored.
- Auto-expanding data views
Expanded data view
With the new default config, we now also detect the terminal width and will
automatically expand the data view to include more information if it's
available.
This uses an improved expanding data view capability from 0.70.
- Redirection
This release also includes a new way of redirecting the stdout and/or stderr
of external commands. This gives easier access to the output streams than was
previously possible.
You can also create a stream built from the above, allowing one stream to empty
and then be followed by the other stream.
- Closures/blocks
We have now split closures and blocks into two separate value types. A closure
can have parameters, can close over variables outside of its scope, and can be
passed as a value.
You can also think of creating a custom command like def foo [] { ... } as
creating a closure.
A block is much simpler and is used as the bottom of commands like if and loops.
Blocks don't close over (or capture) variables, don't have parameters, and
can't be passed as a value. Blocks, however, do have one special trick...
- Mutation
Starting in this release, you can create local mutable variables. You can
create mutable variables using the mut keyword.
A mutable variable can only live and change in the closure in which it's
created. Blocks, however, have access to the mutable variables in the parent
closure. For example, mutating a variable inside of the block used in an if
call is valid.
- Loop/while
The 0.72 release also includes a few new looping commands: loop and while.
The loop command runs a block forever.
The while command will run its block as long as a condition is met:
- Break/continue
Loops can now also use the break and continue feature common in many programming
languages. break will break out of the current loop. And continue will continue
the loop at the next iteration.
- Return
The 0.72 release also includes the ability to return early from a closure or
command.
- Command refinement, simplification, and elimination
This release contains many breaking changes to Nu's built-in commands (sorry!).
As we move toward version 1.0 we want to ensure that Nu ships with a small
curated set of consistent, well-designed "standard library" commands.
This requires taking a hard look at existing commands, and in some cases
breaking changes are unavoidable. We expect that this effort will span a
few release cycles.
- Dataframes no longer included by default - smaller binaries
Nu's dataframe support is extensive, impressive, and very useful to users who
rely on it. However, it comes at a high cost in terms of compile time, binary
size, and complexity. Starting with version 0.72, dataframe commands are no
longer included in the release binaries published on GitHub or the default
binaries published via package managers (like Homebrew, winget, Scoop).
As a result of this change, the main Nu executable is now about 50% smaller.
To continue using dataframe commands, you can build Nu from source using the
dataframe Cargo feature. For example, to install using Cargo: cargo install
nu --features=dataframe.
- Allow reloading overlay definitions (kubouch)
A common pattern in using overlays is shadowing an existing environment
variable, such as PROMPT_COMMAND. However, overlay use would keep loading the
value from the first activation.
Calling overlay use prompt for the first time changes the prompt to the current
time, however, subsequent calls to overlay use won't change the time. That's
because overlays, once activated, store their state so they can be hidden and
restored at later time. To force-reload the environment, we added a new --reload
flag: Calling overlay use --reload prompt repeatedly now updates the prompt with
the current time each time.
- virtualenv activation changes (kubouch)
Since the verion 20.17.0 of virtualenv, the new way to activate an environment
is to call overlay use activate.nu instead of the source activate.nu. This
change is in line with gradual deprecation of source and moving us towards
using modules as overlays in more cases. Please, check the activation script
itself for more details.
- Breaking changes
- As mentioned above, dataframe support has been removed from the default
Nu binaries.
- Nu's SQLite DSL commands have been removed. open foo.db and open
foo.db | query db "SELECT * ..." still work, but the commands which
mapped 1-to-1 with SQL clauses (ex: open foo.db | into db | select * |
from table some_table | order-by some_column) have been removed.
These commands were an interesting experiment but they didn't work out,
and we're removing them to simplify database access in Nu.
- The is_plugin, is_custom, and is_keyword columns in help commands have
been replaced with a single command_type column.
- date format now returns an error if not given an input. Previously it
would default to the current time.
- first and last will now return an error if given a negative index.
Previously the behavior was undefined and may have returned entries
due to an underflow.
- The --predicate flag has been removed from find. where can be used in
all situations where find --predicate was previously used.
- sort-by now requires a column name to sort by. To sort lists without
specifying a column name, sort can be used.
- seq, seq char, and seq date no longer have --separator and --terminator
flags (#7045, #7054, #7096). This helps ensure that the return type for
those commands is consistent, and str join can be used to accomplish the
same effect.
- The build-string command has been removed. To concatenate strings, use
the + operator, string interpolation, or str join.
- wrap now expands ranges. It works the same as with lists or seq.
- url parse url scheme, url host, url path, and url query commands have
been removed. We added the command url parse.
This new command returns a Record with scheme, username, password, host,
path, query, params (as a Record) and fragment.
- sort, sort-by, str contains and find have had their --insensitive flags
renamed to --ignore-case. --ignore-case is used by uniq, as well as
popular external commands like less, grep and wget, so it could be
considered a standard flag name.
- New boolean operator xor - Planned operator simplification
To complement our logical boolean operators and/&& and or/|| we added boolean
xor. This is consistent with bit-and, bit-xor, and bit-or.
We are currently considering to deprecate the C-style symbols &&/|| in \
favor of
the spelled out and/or to increase consistency and provide more actionable
error messages when trying to use &&/|| in a similar fashion to bash.
- Config options have been grouped together
The structure of $env.config (and thus the record used with let-env config =
statements in config.nu and other places) has been reorganised. Various options
are now grouped into subrecords (similar to table_trim) and had their names
shortened. This allows config.nu files to be better structured, and thus easier
to edit and read, while also allowing future options to be added without making
the,
WARNING
Your existing config.nu options WILL still work in this version!! However,
you will get a warning message if you use the old versions of the options
(as you might already be aware). Support for these old options will be dropped
in a future Nushell update, so take care to convert your config.nu files when
you can.
The changes are:
- use_ls_colors and clickable_links have been moved to into an ls subrecord.
- rm_always_trash has been moved into the rm record. Further rm config
options to accompany it may appear in the future.
- cd_with_abbreviations has been moved into a cd record. Further cd config
options to accompany it may appear in the future.
- history_file_format, sync_history_on_enter and max_history_size have been
moved to a history subrecord.
- filesize_metric and filesize_format have been moved to a filesize
subrecord.
- case_sensitive_completions, quick_completions, partial_completions and
completion_algorithm have been moved into a completions subrecord.
- The completions subrecord also contains an external subrecord.
- enable_external_completion, max_external_completion_results, and
external_completer have been moved into the aforementioned subrecord.
- table_mode, table_index_mode and the table_trim subrecord have been
moved into a table subrecord.
To output your existing options in the above format (that could be pasted into
your config.nu file before you delete the old options), run this code in your
copy of Nushell:
- Minimum Rust version has bumped to 1.65
Due to some breakage in dependencies, we've gone ahead and bumped the required
version of Rust to 1.65, which addresses the issue. Apologies to anyone who is
inconvenienced by the bump. We anticipate returning to the Rust-1 versions in
the future.
|