FOSSPicks
Nu Shell
Most of us think the set of terminal environments that are included in most distributions are perennial. They're always there, they seem to have always been there, and they seldom change. People will stick with their chosen environment for decades, perhaps only switching between a distro's default Bash for something more ambitious (such as Zsh) when their needs change. However, all of this doesn't mean there shouldn't be new terminal environments, especially as the computing landscape is completely different from when Bash or Zsh were created. Microsoft's PowerShell has become very popular, for example, especially on a Windows environment when dealing with platforms like .NET and Azure. And Nu Shell attempts to do the same thing for Linux. It's a new shell environment built around the old Unix philosophy of simple commands connected together, built using the modern Rust programming language to better work with a new generation of terminal users, and built to take advantage of data.
As it's built using Rust, Nu can be easily installed via Rust's cargo
package manager, which means it has great multiplatform support. With it installed, the first thing you're likely to do without even thinking about it is run ls
, and this is where the Nu's differences first become apparent. Rather than returning the simple file list you might be expecting, the results from ls
are returned in a formatted ASCII table, with separate columns for name, type, and size. This table output is the default for many of the built-in commands, including date
, ps
, and sys
. It's this structuring of data that makes Nu different from other shells. Nu Shell can parse this data as either simple types like integers, booleans, paths, and string, or more structured types, such as a table row, a binary file, lists, and even chunks of code. You can see this in action with the open
command, which is a viewer for various data formats. A YAML file is shown as a table, for instance, whereas a text file is simply displayed. Similarly, if Nu understands what constitutes a field within a file, or a field that has been delimited with a known character, those fields can be processed just as you might a single element of output.
To help with this data processing, Nu also includes an expanded pipeline. This works in three parts: an input, a filter, and the output. The excellent documentation includes an example that takes a TOML file as input and uses the filter to search and increment a version field before saving the output to a new file. There's also some great use of color. Command colors are different from argument colors, which are different from the values you may pass to a command. Pipes are colored differently too, and while the colors themselves will depend on your terminal's configuration, this differentiation makes commands easier to understand and helps you avoid mistakes. All of this is bound together with an intuitive autocomplete that helps you deal with the new syntax. It takes some time to learn, but Nu Shell is a great tool if you often find yourself constructing long lines in Bash to deal with esoteric output.
Project Website
Vim trainer
PacVim
Vim, the terminal-based text editor, has been around for a long time, but in all this time, its steep learning curve has never been associated with entertainment. PacVim almost manages to do this by turning Vim navigation keys into a challenging Pacman-like game that also happens to teach you how to navigate in the venerable editor. The whole game uses Curses to render each level into the terminal using characters, with bars and pipes for the tunnels and alphanumeric characters formed into words as their background. At first glance, these seem like little more than background decoration, but of course, they're not. You're supposed to use Vim's comprehensive word and character navigation keys to move as quickly as you can through the maze because your mission is to turn them all green while avoiding the red Gs that act as ghosts chasing you.
It's actually difficult to get started, because the game doesn't hold your hand or tell you how you might best approach each level. Much like the arcade game, you need to try different strategies while you slowly get better. Even though the game starts with only two ghosts chasing you, it's still hard. They move in real time, which means there's no pause when you don't press a key. You also have to avoid tilde symbols and the edge of the maze, as these will take one of your lives away, and the corridors themselves are often multiple characters wide, which means you need to move through every character. The only way to really beat the game is to master the Vim keys that move you through words and up columns quickly, which if you can master this means you've also mastered Vim.
Project Website
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.