Search

Dark theme | Light theme

July 28, 2026

Nushell Niceties: Splitting String Values Into A Table

You can use the split column command to split a string value or a list of string values into a table. You need to specify a delimiter to split the value on. In the resulting table the elements are stored in columns. By default the columns have the name column<index> where index is the number of the column starting with 0. It is possible to define your own column names by specifying their names as parameters for the split column command. This way the resulting table will have more meaningful names.

July 19, 2026

Nushell Niceties: Finding Same Elements In Lists Or Tables

The intersect command can be used on lists and tables to find the same elements that are in the input list or table and a provided list or table. The input is passed to the command and the other list or table is an argument for the intersect command.

July 15, 2026

Nushell Niceties: Generating Passwords

Since Nushell 0.114.0 you can use the random pass command to generate a random password of 12 characters. Nushell will use a combination of letters, numbers and symbols. It is possible to generate a password with a different length using the command-line option --chars (or -c) followed by the size of the password. The minimal length is 4 characters and the maximum size is 128 characters.

If you don’t want to include symbols then you must use the option --no-symbols (or -s). To exclude numbers the option --no-numbers or short-hand -n must be used. And finally to exclude lowercase characters use --no-lowercase (or -l) and to exclude uppercase characters use --no-uppercase (or -u).

To support a requirement that at least one character, one number and one symbol is needed the option --require-each-type must be used. By default Nushell will not use the ambiguous characters 0, O, 1 and l in the same password, because it can be hard to read the differences between the characters with some fonts. In order to use these characters in the same generated password you must the option --include-ambiguous. Also the characters i, 1 and l are not used together, but if you specify the option --include-similar these characters can be used in the same generated password.

April 19, 2026

Nushell Niceties: Wrapping External Commands With def --wrapped

The def keyword in Nushell is used to define a custom command. By adding the --wrapped flag you can tell Nushell to accept unknown flags and arguments and pass them on as strings. In the command parameters you use a "rest" parameter defined by …​ to capture the remaining arguments. Then in the command body you use the spread operator …​ to expand them again. This is very useful when you want to create a small wrapper around an external command with lots of options, but without having to define all those options yourself.

April 4, 2026

Kotlin Kandy: Get Text Before Or After A Delimiter

Kotlin adds the substringBefore, substringBeforeLast, substringAfter and substringAfterLast extension functions to the String class. Instead of using indices to get a substring you can use a string or character value. The functions without Last use the first occurrence of the delimiter and the methods with Last use the last occurrence. If the delimiter is not found the original string is returned. You can supply a value that should be returned when the delimiter is not found.

April 3, 2026

Kotlin Kandy: Get A Random Element From A Collection

Kotlin has very useful extensions functions for working with collections. These extension functions make working with collections more easy and fun. One of the extension functions is the random function. When you call random() Kotlin returns a single element from the collection using the default random source. The function also accepts a Random instance as argument. This instance has a seeded value to return repeatable random values.

April 2, 2026

Kotlin Kandy: Transform Map Keys Or Values With mapKeys And mapValues

Sometimes you want to transform only the keys in a Map, or only transform the values. Kotlin has two useful methods to achieve this: mapKeys and mapValues. You can use mapKeys to transform the keys of the map while keeping the values the same. With mapValues you can transform the values of the map while keeping the keys the same. Both methods accept a lambda function as asrgument of type Map.Entry and must return the new key or value. In order to transform the keys or values and add the result to an existing Map you can use the methods mapKeysTo and mapValuesTo. The first argument is the existing (mutable) Map and the second argument is the lambda function.

Nushell Niceties: Check If Semantic Version Is A Match

In a previous blogpost you can learn about the semver command in Nushell to transform a string value into a semver type. The command has a subcommand match-req. You can use this command to check if a version matches part of the semantic version parts. The result is a boolean value. The version to compare with doesn’t have to defined fully, but could exist of only the major, minor or patch parts. The value you pass can also be used to check if a version is greater or smaller than a given version. A range with a lower and upper version to match on can be defined as well. The boundary values are separated by a comma.

March 20, 2026

Nushell Niceties: Sorting Version Values With Semver Ordering

The semver Nushell plugin can be used to work with string values as semver type as you can see in a previous post. You can use the semver sort command to sort string values with ordering rules for semantic versions. With natural ordering of string values a value of 10.0.1 is placed before 2.1.0, but if you use semver sort the ordering will be correct. The command will look at all the parts of the semver type. So a major version of 2 is placed before 10. If the major version part is the same than the minor part is used for ordering and so on. To sort in descending order you can use the option --reverse or the short option -r.

March 18, 2026

Nushell Niceties: Bumping Semantic Version

In a previous blogpost you can learn about the semver command in Nushell to transform a string value into a semver type. With the semver bump command you can increase one of the components of the semver type. For example to increase the major version part you can use semver bump major. This command will also update the minor and patch parts if needed. The result is a semver type and you can use into value to transform it to a string type.

February 17, 2026

Nushell Niceties: Transform Values Into Semver Types

Nushell can be extended with plugins to have more functionality or types that are not part of standard Nushell. If you want to work with string values that are actually semantic version values (https://semver.org) you can use the Nushell SemVer plugin. The plugin must be added to Nushell by using the command plugin add <location of plugin>. You can check with plugin list command if the plugin is available. This command also shows commands that the plugin adds to Nushell.

The command into semver can be used to convert string values into a semver type. The semver type has 5 properties: major, minor, patch, pre and build. You can use dot notation to get the values for these properties or use the get command. In the following command a string value is transformed to a semver type: let v = '4.0.2' | into semver. And with $v.major you can extract the major part of the semver value and it returns 4.
Records with the keys major, minor, patch, pre and build can be transformed to a semver string with the semver from-record command. And to transform a semver type to a record you can use the command semver into-record.

January 28, 2026

Awesome AssertJ: Use isEqualToNormalizingNewlines To Assert With Text Block

A Java text block is an easy way to have a multiline string value. But there is a catch if we want to use a text block with the assertion method isEqualTo. Suppose you have written a piece of code that create a new string value where the line endings are defined using System.lineSeparator(). The string value would have the line ending \n on Linux and MacOS systems, and the line ending \r\n on Windows system. But a Java text block will always use the line ending \n on every platform, including the Windows platform. If you would run your tests on a Windows platform then the assertion using isEqualTo will fail, but the test will pass on Linux or MacOS systems. This is a problem if you are working with developers using different operating systems. Therefore it is better to use the method isEqualToNormalizingNewlines for these type of assertions. AssertJ will make sure the line endings are the same and the tests will pass independent of the operating system the tests are run on.

January 25, 2026

Nushell Niceties: Checking If Value Is In List Or String Or Key In Record

Nushell has the in operator to check if a value is an element of list. With the same in operator you can check if a string is a substring of another string. And finally you can use the in operator to check if a key is in a record. When you use the operator the value you want to check is defined before the operator and the list, other string or record is defined after the operator.
The not-in operator is the opposite of the in operator and checks if a value is not in list or other string or key in a record.
It is also possible to use the has and not-has operators to do the same checks, but the value you want to check is set after the operator. The list, other string or record is set before the operator.

January 8, 2026

Nushell Niceties: Calculating The Average Of Numeric Values

In order to calculate an average for a list of numbers, file sizes, durations, or range of numbers, or a table with columns containing numeric values you can use the math avg command. This command is part of the math module of Nushell. When the input is a list then the result is a single value with the average of all values in the list. If you use a table as input the result is a record where the key is the column name and the value the average of all values in that column. Finally it is possible to have a single value as input and the result is the same value obviously.

Nushell Niceties: Calculating The Sum Of Numeric Values

The math module in Nushell has a lot of useful commands to work with numeric values. You can use the math sum command to calculate the sum of a multiple numeric values. The input of the command can be a list of numbers, durations, file sizes, or a range or table with columns containing numeric values. The result is a single numeric value with the sum of all values in the input. The math sum command can also be used on a table with multiple numeric columns. It will return a record with the sum of all values for each column.

January 6, 2026

Nushell Niceties: Getting Minimum And Maximum Values

In Nushell we can use a lot a math related commands to get for example the minimum and maximum values of a list of numbers. In the math module you can find the commands math min and math max. You can use these commands to get the minimum and maximum values of a list of numbers, durations, file sizes, a range and tables.

December 10, 2025

Nushell Niceties: Checking String Starts Or Ends With Given String

To check if a string value starts or ends with a given string you can use the str starts-with and str ends-with commands. The command returns a boolean value: true if the string starts or ends with the given string and false otherwise. The commands are case sensitive by default. You can use the --ignore-case (or the shorthand -i) to ignore casing while checking if a the string starts or ends with a given string.
To input can be a string value and then that string value is checked. If the input is an array of string values, then each element is checked. It is also possible to check values in a record or table. You need to pass the names of the field(s) or column(s) that you want to check the string values of.

December 2, 2025

Nushell Niceties: Tables With Different Themes

A lot of commands have output displayed as table. It is possible to use different themes for tables. If you run the command table --list you get all available themes. At the moment the following themes are available: basic, compact, compact_double, default, heavy, light, none, reinforced, rounded, thin, with_love, psql, markdown, dots, restructured, ascii_rounded, basic_compact, single, double. You can use a theme with the table command by using the --theme option and the name of the theme. For example to have a different table theme for the ls command you can use ls | table --theme light.
If you want to change the theme for all table output you can set the configuration option $env.config.table.mode. To make this configuration setting permanent you can add it to config.nu file.

November 14, 2025

Nushell Niceties: Summon Ellie The Nushell Mascot

When you start Nushell you can see a nice ASCII art elephant. That is Ellie a cute and friendly elephant mascot for Nushell. Elephants are popular as you can see them in other products like Mastodon and Gradle. It is possible to summon Ellie in your Nushell environment by running the ellie command. This command is part of the std library and you need to run use std ellie or std use * first.

November 6, 2025

Nushell Niceties: Checking For Emptiness

To check if a value is empty you can use the is-empty command. The command can be used for string values, lists and records.
The opposite check to see if a value is not empty can be done with the is-not-empty command. Just like with the is-empty command this can be used for string values, lists and records. To check if values in a table column are not empty the names of the columns to check can be passed as argument.