a028eeeacc
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) |
||
---|---|---|
.. | ||
ast-ksh | ||
autojump | ||
bash | ||
bash-completion | ||
bash2 | ||
bash2-doc | ||
bosh | ||
dash | ||
eltclsh | ||
elvish | ||
es | ||
es-shell | ||
esh | ||
etsh | ||
fish | ||
git-sh | ||
guile-gash | ||
heirloom-sh | ||
ksh93 | ||
lshell | ||
mksh | ||
nologinmsg | ||
nushell | ||
oksh | ||
pbosh | ||
pdksh | ||
perlsh | ||
posh | ||
rc | ||
rssh | ||
scponly | ||
scsh | ||
sheldon | ||
shellcheck | ||
standalone-tcsh | ||
starship | ||
static-ast-ksh | ||
static-tcsh | ||
tcsh | ||
xonsh | ||
xsh | ||
yash | ||
zsh | ||
zsh-autosuggestions | ||
zsh-completions | ||
zsh-pure | ||
zsh-syntax-highlighting | ||
Makefile |