A Quick Look at Elvish Shell

Everyone who comes to this site has some knowledge (no matter how slight) of the Bash shell that comes default of so many systems. There have been several attempts to create shells that solve some of the shortcomings of Bash that have appeared over the years. One such shell is Elvish, which we will look at today.

What is Elvish Shell?

Pipelines In Elvish
Pipelines In Elvish

Elvish is more than just a shell. It is also “an expressive programming language”. It has a number of interesting features including:

  • Written in Go
  • Built-in file manager, inspired by the Ranger file manager (Ctrl + N)
  • Searchable command history (Ctrl + R)
  • History of directories visited (Ctrl + L)
  • Powerful pipelines that support structured data, such as lists, maps, and functions
  • Includes a “standard set of control structures: conditional control with if, loops with for and while, and exception handling with try
  • Support for third-party modules via a package manager to extend Elvish
  • Licensed under the BSD 2-Clause license

“Why is it named Elvish?” I hear you shout. Well, according to their website, they chose their current name because:

In roguelikes, items made by the elves have a reputation of high quality. These are usually called elven items, but β€œelvish” was chosen because it ends with β€œsh”, a long tradition of Unix shells. It also rhymes with fish, one of the shells that influenced the philosophy of Elvish.

How to Install Elvish Shell

Elvish is available in several mainstream distributions.

Note that the software is very young. The most recent version is 0.12. According to the project’s GitHub page: “Despite its pre-1.0 status, it is already suitable for most daily interactive use.”

Elvish Control Structures
Elvish Control Structures

Debian and Ubuntu

Elvish packages were introduced into Debian Buster and Ubuntu 17.10. Unfortunately, those packages are out of date and you will need to use a PPA to install the latest version. You will need to use the following commands:

sudo add-apt-repository ppa:zhsj/elvish
sudo apt update
sudo apt install elvish

Fedora

Elvish is not available in the main Fedora repos. You will need to add the FZUG Repository to install Evlish. To do so, you will need to use these commands:

sudo dnf config-manager --add-repo=http://repo.fdzh.org/FZUG/FZUG.repol
sudo dnf install elvish

Arch

Elvish is available in the Arch User Repository.

I believe you know how to change shell in Linux so after installing you can switch to Elvish to use it.

Final Thoughts on Elvish Shell

Personally, I have no reason to install Elvish on any of my systems. I can get most of its features by installing a couple of small command line programs or using already installed programs.

For example, the search past commands feature already exists in Bash and it works pretty well. If you want to improve your ability to search past commands, I would recommend installing fzf instead. Fzf uses fuzzy search, so you don’t need to remember the exact command you are looking for. Fzf also allows you to preview and open files.

I do think that the fact that Elvish is also a programming language is neat, but I’ll stick with Bash shell scripting until Elvish matures a little more.

Have you every used Elvish? Do you think it would be worthwhile to install Elvish? What is your favorite Bash replacement? Please let us know in the comments below.

If you found this article interesting, please take a minute to share it on social media, Hacker News or Reddit.

About the author
John Paul Wohlscheid

John Paul Wohlscheid

My name is John Paul Wohlscheid. I'm an aspiring mystery writer who loves to play with technology, especially Linux. You can catch up with me at: http://johnpaulwohlscheid.work/

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.