mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-03 23:40:14 +08:00
parent
044c243ff7
commit
b3f4699a6f
@ -0,0 +1,373 @@
|
||||
[#]: subject: "Beyond Bash: 9 Lesser-Known Linux Shells and Their Capabilities"
|
||||
[#]: via: "https://itsfoss.com/shells-linux/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "ChatGPT"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15870-1.html"
|
||||
|
||||
超越 Bash: 9 个不太知名的 Linux Shell 及其功能
|
||||
======
|
||||
|
||||
![][0]
|
||||
|
||||
> 你可能已经知道像 Bash 和 Zsh 这样的流行 Shell。让我们来探索一些有趣和独特的 Shell。
|
||||
|
||||
Shell 通过解释命令为 Linux 和类 Unix 系统提供了一个接口,充当用户与操作系统的核心工作之间的中介。
|
||||
|
||||
毫无疑问,**Bash Shell 是最受欢迎的 Shell** 之一,但有些用户喜欢其他 Shell,比如在 macOS 上的默认 Shell——ZSH。但是除了这些流行的 Shell 之外,还存在许多 Shell,具有不同的功能和用途。
|
||||
|
||||
在本文中,我们将介绍一些被积极维护并提供不同用户体验的不太常见的 Shell。
|
||||
|
||||
### 1、Fish Shell
|
||||
|
||||
谈到除了 Bash、Zsh 之外的 Shell,第一个想到的就是 Fish Shell。
|
||||
|
||||
Fish 是一个智能的、用户友好的命令行 Shell,主要适用于类 Unix 操作系统。
|
||||
|
||||
![Fish Shell][1]
|
||||
|
||||
Fish Shell 的特点:
|
||||
|
||||
- 根据历史记录提供命令自动建议和补全。
|
||||
- 支持 24 位真彩。
|
||||
- 支持语法高亮,所有特性都可以开箱即用。
|
||||
|
||||
安装 Fish:
|
||||
|
||||
Fish 可在几乎所有 Linux 发行版的官方仓库中获得。在 Ubuntu 中,你可以通过以下命令来安装:
|
||||
|
||||
```
|
||||
sudo apt install fish
|
||||
```
|
||||
|
||||
Ubuntu 仓库中的版本有点旧。如果你想安装最新版本,可以使用该团队提供的官方 PPA。
|
||||
|
||||
```
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
sudo apt update
|
||||
sudo apt install fish
|
||||
```
|
||||
|
||||
> **[Fish Shell][2]**
|
||||
|
||||
### 2、Nushell
|
||||
|
||||
Nushell(Nu)是一种新型的 Shell,可以在 Linux、macOS、Windows、BSD 等系统上使用。它的哲学和灵感来自于类似于 [PowerShell][3]、函数式编程语言和现代 [CLI][4] 工具等项目。
|
||||
|
||||
![Nushell][5]
|
||||
|
||||
Nushell 的特点:
|
||||
|
||||
- 一切皆数据:Nu 管道使用结构化数据,因此你每次都可以使用同样的方式安全地选择、过滤和排序。
|
||||
- 强大的插件:可以使用强大的插件系统轻松扩展 Nu。
|
||||
- 易读的错误消息:Nu 操作的是类型化的数据,因此它能够检测其他 Shell 无法检测到的错误。当出现问题时,Nu 会准确指出问题所在和原因。
|
||||
- 干净的 IDE 支持。
|
||||
|
||||
安装 Nushell:
|
||||
|
||||
如果你使用的是 Ubuntu,是无法找到一个 Apt 存储库来安装 Nushell 的。但是,根据其在 [GitHub 上的说明][6],你可以通过安装所需的依赖项来构建它。
|
||||
|
||||
幸运的是,还有一种方法可以使用 Homebrew 在任何发行版上安装它。你可以参考我们的教程 [在 Linux 上安装并使用 Homebrew 软件包管理器][7],成功在 Linux 上安装后,你需要输入以下命令来安装 Nushell:
|
||||
|
||||
```
|
||||
brew install nushell
|
||||
```
|
||||
|
||||
请访问其官方网站以查看更多安装方式。
|
||||
|
||||
> **[Nushell][8]**
|
||||
|
||||
### 3、Dune
|
||||
|
||||
该项目的创建者将 **Dune** 描述为海滩上的一个 “贝壳”。Dune 是一个快速、实用且美观的 Shell,提供了一些特殊的元编程功能,比如引用。
|
||||
|
||||
![Dune Shell][9]
|
||||
|
||||
Dune Shell 的特点:
|
||||
|
||||
- 在进入交互模式之前,Dune 执行存储在主目录中的“预载”启动文件。
|
||||
- Dune 的 REPL 是完全可定制的。
|
||||
- 可以通过将变量分配给程序名称来定义别名。
|
||||
- 使用宏来编写修改 Shell 环境的函数,就像命令或程序一样。
|
||||
- Dune 提供了丰富的标准库,并提供漂亮的界面来查看每个模块中可用的所有函数。
|
||||
|
||||
安装 Dune Shell:
|
||||
|
||||
Dune shell 可在 Arch Linux 存储库中以 `dunesh` 的名字获得。
|
||||
|
||||
对于其他用户,Dune shell 可以通过 `cargo` 安装。所以,首先需要 [安装最新版本的 Rust][2]。如果已经安装了 Rust,请确保你有最新的版本,然后继续安装 Dune。
|
||||
|
||||
```
|
||||
cargo install -f dune
|
||||
```
|
||||
|
||||
安装完成后,可以通过输入以下命令访问 Shell:
|
||||
|
||||
```
|
||||
dunesh
|
||||
```
|
||||
|
||||
> **[Dune Shell][11]**
|
||||
|
||||
### 4、Xonsh
|
||||
|
||||
Xonsh 是一个用 Python 编写的,跨平台 Shell 和命令提示符。它结合了 Python 和 Bash Shell,用户可以直接在 Shell 中运行 Python 命令。甚至可以结合使用 Python 和 Shell 命令。
|
||||
|
||||
![Xonsh shell][12]
|
||||
|
||||
如果你想了解更多,请阅读我们的 Xonsh 文章:
|
||||
|
||||
> **[Xonsh Shell:结合 Bash Shell 和 Python 最佳特点的 Shell][12a]**
|
||||
|
||||
Xonsh Shell 的特点:
|
||||
|
||||
- Xonsh 语言具有 Bash 中常用的 Shell 原语。
|
||||
- 在 Python 中准备环境变量和参数,然后在 Shell 命令中使用它们。
|
||||
- 第三方扩展系统 Xontribs。
|
||||
- 可自定义的标签补全、键绑定、颜色样式。
|
||||
- 丰富的界面,方便查看历史记录。
|
||||
|
||||
安装 Xonsh Shell:
|
||||
|
||||
Xonsh 可在许多 Linux 发行版的仓库中获得,如 Ubuntu、Fedora 等。因此,要在 Ubuntu 上安装它,请运行:
|
||||
|
||||
```
|
||||
sudo apt install xonsh
|
||||
```
|
||||
|
||||
Xonsh 还提供了一个 AppImage 包,可以从它们的下载页面下载。如果你不熟悉这种文件格式,请参考我们的 [AppImage 指南][13]。
|
||||
|
||||
> **[Xonsh][14]**
|
||||
|
||||
### 5、Hilbish
|
||||
|
||||
Hilbish 是一个可扩展 Shell,可通过 Lua 编程语言进行定制。该 Shell 面向普通用户和高级用户。
|
||||
|
||||
![Hilbish shell][15]
|
||||
|
||||
Hilbish 的特点:
|
||||
|
||||
- 简单易用的脚本编写。
|
||||
- 历史和补全菜单:为用户提供正确的补全和历史搜索菜单。
|
||||
- 通过 Lua API 可以进行语法高亮和提示。
|
||||
- 它可以在 Unix 系统和 Windows 上运行,但在 Windows 上可能会遇到问题。
|
||||
|
||||
安装 Hilbish:
|
||||
|
||||
Hilbish 在 Ubuntu 的包仓库中不可用。因此,需要从源代码构建安装。
|
||||
|
||||
要安装它,需要安装 **Go** 和 **task**。
|
||||
|
||||
```
|
||||
sudo apt install golang-go
|
||||
sudo snap install task --classic
|
||||
```
|
||||
|
||||
安装完依赖项后,运行以下命令来安装 Hilbish shell:
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/Rosettea/Hilbish
|
||||
cd Hilbish
|
||||
go get -d ./...
|
||||
```
|
||||
|
||||
如果要使用稳定版,请运行以下命令:
|
||||
|
||||
```
|
||||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
task build
|
||||
sudo task install
|
||||
```
|
||||
|
||||
> **[Hilbish][16]**
|
||||
|
||||
### 6、Elvish
|
||||
|
||||
Elvish 是一种丰富的编程语言和多功能交互式 Shell。它可以在 Linux、Mac 和 Windows 上运行。即使版本 v1.0 尚未发布,它已经适合大多数日常交互使用。
|
||||
|
||||
![Elvish shell][17]
|
||||
|
||||
Elvish 的特点:
|
||||
|
||||
- 强大的管道:Elvish 中的管道可以携带结构化数据,而不仅仅是文本。你可以通过管道传输列表、映射甚至函数。
|
||||
- 直观的控制结构。
|
||||
- 目录历史:Elvish 记住了你访问过的所有目录。你可以通过按 `CTRL+L` 访问它。
|
||||
- 命令历史。
|
||||
- 内置文件管理器:通过按 `CTRL + N` 访问。
|
||||
|
||||
安装 Elvish:
|
||||
|
||||
Elvish Shell 可在 Ubuntu 和 Arch Linux 的包管理器中获得。因此,要安装它,请打开终端并键入:
|
||||
|
||||
```
|
||||
sudo apt install elvish
|
||||
```
|
||||
|
||||
或者
|
||||
|
||||
```
|
||||
sudo pacman -S elvish
|
||||
```
|
||||
|
||||
要了解有关 Elvish 的更多信息,请访问 Elvish 的官方网站。
|
||||
|
||||
> **[Elvish][18]**
|
||||
|
||||
### 7、Oh
|
||||
|
||||
据其开发者称,Oh 是 Unix shell 的重新设计。
|
||||
|
||||
它旨在成为现代 Shell 的更强大、更稳健的替代品,同时尊重 Unix shell 在过去半个世纪中建立的惯例。
|
||||
|
||||
![][19]
|
||||
|
||||
Oh Shell 的特点:
|
||||
|
||||
- 一流的频道、管道、环境和函数。
|
||||
- 适用于标准 Shell 构造的丰富返回值。
|
||||
- 支持模块化。
|
||||
- 简化的评估和引用规则。
|
||||
- 语法尽可能少地偏离已有的惯例。
|
||||
|
||||
安装 Oh:
|
||||
|
||||
Oh 提供了一个预编译的二进制文件。你需要从它们的 [官方 GitHub 页面][20] 下载它。
|
||||
|
||||
你需要使用以下命令为文件授予执行权限:
|
||||
|
||||
```
|
||||
chmod +x oh
|
||||
```
|
||||
|
||||
运行以下命令以在你的系统上安装它:
|
||||
|
||||
```
|
||||
sudo mv oh /usr/local/bin/
|
||||
```
|
||||
|
||||
现在,你可以通过以下命令启动 Oh:
|
||||
|
||||
```
|
||||
oh
|
||||
```
|
||||
|
||||
要了解有关 Oh 的详细信息,请查阅其文档。
|
||||
|
||||
> **[Oh][21]**
|
||||
|
||||
### 8、Solidity
|
||||
|
||||
Solidity 是一个带有轻量级会话记录和远程编译器支持的交互式 Shell。当你更改指示/语言时,它会自动获取匹配的远程编译器。
|
||||
|
||||
![][22]
|
||||
|
||||
Solidity 的特点:
|
||||
|
||||
- `pragma solidity <version>` 会尝试动态加载所选的编译器版本。
|
||||
- 可以使用 `.session` 命令保存和恢复会话。
|
||||
- 设置在退出时保存(在运行并发 shell 时不安全)。
|
||||
- `$_` 是上一个已知结果的占位符。
|
||||
- 特殊命令是具有点前缀。其他所有都将被视为 Solidity 代码进行评估。
|
||||
|
||||
安装 Solidity:
|
||||
|
||||
你可以通过 `npm` 安装 Solidity shell。
|
||||
|
||||
[确保你安装了最新版本的 nodejs][23] 和 `npm`,然后输入以下命令:
|
||||
|
||||
```
|
||||
npm install -g solidity-shell
|
||||
```
|
||||
|
||||
安装完成后,运行 `solidity-shell` 来开始会话。
|
||||
|
||||
> **[Solidity Shell][24]**
|
||||
|
||||
### 9、Yash
|
||||
|
||||
Yash(Yet another shell)是一个遵循 POSIX 标准的命令行 Shell,使用 C99(ISO/IEC 9899:1999)编写。它具有适用于日常交互和脚本使用的功能。
|
||||
|
||||
![][25]
|
||||
|
||||
Yash Shell 的特点:
|
||||
|
||||
- 全局别名。
|
||||
- 套接字重定向、管道重定向和进程重定向。
|
||||
- 提示符命令和未找到命令的处理程序。
|
||||
- 带有预定义补全脚本的命令行补全,覆盖了 100 多个命令。
|
||||
- 基于命令历史记录的命令行预测。
|
||||
|
||||
安装 Yash Shell:
|
||||
|
||||
要安装该 Shell,你需要转到它们的 [GitHub 发布][26] 页面下载 tar 文件。解压 tar 文件;在其中,你将找到一个包含安装说明的 `INSTALL` 文件。
|
||||
|
||||
通常,你应该在提取的文件夹中执行以下命令:
|
||||
|
||||
```
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
要了解有关 Yash Shell 的详细信息,请查看其手册页面。
|
||||
|
||||
> **[Yash][27]**
|
||||
|
||||
### 顺便提及
|
||||
|
||||
- Ion:[Ion Shell][28] 是用 Rust 编写的一种现代系统 Shell,主要用于 RedoxOS。它仍然是一个正在开发中的工作,用户应该对语法会变化有所预料。
|
||||
- Closh:[Closh][29] 是一种类似 Bash 的 Shell,将传统的 UNIX Shell 与 [Clojure][30] 的强大功能相结合。它旨在成为 Bash 的现代替代品。它也是在开发的早期阶段。
|
||||
- Dash:[Dash][31] 是来自 Debian 的符合 POSIX 标准、快速轻量级的 Shell。
|
||||
|
||||
💬 你对这些列出的 Shell 有何看法?你是否会尝试将默认 Shell 更改为这里的某些选项?你最喜欢的是哪一个?在下面的评论框中分享你的想法。
|
||||
|
||||
*(题图:MJ/a84a1625-4dd1-4589-aabb-ce3f37090f32)*
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/shells-linux/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:ChatGPT
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/sreenath/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/content/images/2023/01/fish-shell.png
|
||||
[2]: https://fishshell.com/
|
||||
[3]: https://itsfoss.com/microsoft-open-sources-powershell/
|
||||
[4]: https://itsfoss.com/gui-cli-tui/
|
||||
[5]: https://itsfoss.com/content/images/2023/01/nushell.png
|
||||
[6]: https://github.com/nushell/nushell
|
||||
[7]: https://itsfoss.com/homebrew-linux/
|
||||
[8]: https://www.nushell.sh/
|
||||
[9]: https://itsfoss.com/content/images/2023/01/dunesh.png
|
||||
[10]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/
|
||||
[11]: https://github.com/adam-mcdaniel/dune
|
||||
[12]: https://itsfoss.com/content/images/2023/01/xonsh.png
|
||||
[12a]: https://itsfoss.com/xonsh-shell/
|
||||
[13]: https://itsfoss.com/use-appimage-linux/
|
||||
[14]: https://xon.sh/
|
||||
[15]: https://itsfoss.com/content/images/2023/01/hilbish.png
|
||||
[16]: https://rosettea.github.io/Hilbish/
|
||||
[17]: https://itsfoss.com/content/images/2023/01/elvish.png
|
||||
[18]: https://elv.sh/
|
||||
[19]: https://itsfoss.com/content/images/2023/01/oh_Shell.png
|
||||
[20]: https://github.com/michaelmacinnis/oh#linux
|
||||
[21]: https://github.com/michaelmacinnis/oh
|
||||
[22]: https://itsfoss.com/content/images/2023/01/solidity-shell.png
|
||||
[23]: https://itsfoss.com/install-nodejs-ubuntu/
|
||||
[24]: https://github.com/tintinweb/solidity-shell
|
||||
[25]: https://itsfoss.com/content/images/2023/01/yash.png
|
||||
[26]: https://github.com/magicant/yash/releases/tag/2.53
|
||||
[27]: https://yash.osdn.jp/index.html.en
|
||||
[28]: https://gitlab.redox-os.org/redox-os/ion
|
||||
[29]: https://github.com/dundalek/closh
|
||||
[30]: https://clojure.org/
|
||||
[31]: https://linuxhandbook.com/dash-shell/
|
||||
[0]: https://img.linux.net.cn/data/attachment/album/202306/02/175710r3c8shssf5qss2tf.jpg
|
@ -1,346 +0,0 @@
|
||||
[#]: subject: "Beyond Bash: 9 Lesser-Known Linux Shells and Their Capabilities"
|
||||
[#]: via: "https://itsfoss.com/shells-linux/"
|
||||
[#]: author: "Sreenath https://itsfoss.com/author/sreenath/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Beyond Bash: 9 Lesser-Known Linux Shells and Their Capabilities
|
||||
======
|
||||
|
||||
A Shell provides an interface to Linux and Unix-like systems by interpreting commands and acts as an intermediary between the user and the core workings of the operating system.
|
||||
|
||||
Undoubtedly, the **bash shell is the most popular one**, and some users prefer other shells like ZSH, which is the default shell in macOS. But many shells exist other than these popular ones, with different features and use cases.
|
||||
|
||||
In this article, we will take a look at some less popular shells that are actively maintained and provide a different user experience.
|
||||
|
||||
### 1. Fish Shell
|
||||
|
||||
When talking about shells other than bash/zsh, the first name coming to our mind is the fish shell.
|
||||
|
||||
Fish is a **smart, user-friendly command line shell** primarily for UNIX-like operating systems.
|
||||
|
||||
![fish shell][1]
|
||||
|
||||
**Features of Fish Shell**
|
||||
|
||||
- Autosuggestion of commands based on history and completions.
|
||||
- Supports 24-bit color.
|
||||
- It supports syntax highlighting, and all features work out of the box.
|
||||
|
||||
**Install Fish**
|
||||
|
||||
Fish is available in the official repos of almost all Linux distributions. In Ubuntu, you can install it by:
|
||||
|
||||
```
|
||||
sudo apt install fish
|
||||
```
|
||||
|
||||
The version in the Ubuntu repos is a bit old. If you want to install the latest version, you can use the official PPA provided by the team.
|
||||
|
||||
```
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
sudo apt update
|
||||
sudo apt install fish
|
||||
```
|
||||
|
||||
[Fish Shell][2]
|
||||
|
||||
### 2. Nushell
|
||||
|
||||
Nushell is a new type of shell that works in **Linux, macOS, Windows, BSD**, etc. **Nu**, as it’s also called, it takes its philosophy and inspiration from projects like [PowerShell][3], functional programming languages, and modern [CLI][4] tools.
|
||||
|
||||
![nushell][5]
|
||||
|
||||
**Features of Nushell**
|
||||
|
||||
- **Everything is data:** Nu pipelines use structured data so you can safely select, filter, and sort the same way every time.
|
||||
- **Powerful plugins:** It's easy to extend Nu using a powerful plugin system.
|
||||
- **Easy to read error messages.** Nu operates on typed data, so it catches bugs that other shells don’t. And when things break, Nu tells you exactly where and why.
|
||||
- Clean IDE support.
|
||||
|
||||
**Install Nushell**
|
||||
|
||||
If you’re on Ubuntu, you won’t find an apt repository to install Nushell. But you can build it by installing the required dependencies, as per its [instructions on GitHub][6].
|
||||
|
||||
Fortunately, there is a way to install it on any distro using **Homebrew**. You can refer to our tutorial on [installing and using Homebrew Package Manager on Linux][7].
|
||||
|
||||
Once you successfully set it up on Linux, you need to type in the following command to install Nushell:
|
||||
|
||||
```
|
||||
brew install nushell
|
||||
```
|
||||
|
||||
Head to its official website to explore more installation options.
|
||||
|
||||
[Nushell][8]
|
||||
|
||||
### 3. Dune
|
||||
|
||||
The project's creator describes **Dune** as a shell by the beach. Dune is a **fast, useful and pretty shell**, offering a few niche metaprogramming features such as quoting.
|
||||
|
||||
![dune shell][9]
|
||||
|
||||
**Features of Dune Shell**
|
||||
|
||||
- Before entering the interactive mode, Dune executes _the prelude,_ a startup file stored in the home directory.
|
||||
- Dune's REPL is entirely customizable
|
||||
- You can define aliases by assigning a variable to a program's name
|
||||
- Use a macro to write functions that modify your shell's environment and act like commands or programs
|
||||
- Dune offers an extensive standard library and also provides a pretty interface to see all the functions available in each module.
|
||||
|
||||
**Install Dune Shell**
|
||||
|
||||
Dune shell is available in the Arch Linux repository as **dunesh**.
|
||||
|
||||
For all other users, the Dune shell can be installed with cargo. So first, you need to [install the latest version of rust][10]. If you already have rust installed, ensure you have the latest version and then proceed to install Dune.
|
||||
|
||||
```
|
||||
cargo install -f dune
|
||||
```
|
||||
|
||||
Once installed, you can access the shell by entering the following:
|
||||
|
||||
```
|
||||
dunesh
|
||||
```
|
||||
|
||||
[Dune Shell][11]
|
||||
|
||||
### 4. Xonsh
|
||||
|
||||
Xonsh is a **Python-powered, cross-platform shell** and command prompt. It combines Python and bash shell so that you can run Python commands directly in the shell. You can even combine Python and shell commands.
|
||||
|
||||
![xonsh shell][12]
|
||||
|
||||
We had a separate article on Xonsh if you are curious to learn more:
|
||||
|
||||
**Features of Xonsh Shell**
|
||||
|
||||
- The Xonsh language has shell primitives that you are used to from Bash
|
||||
- Prepare environment variables and arguments in Python and use them in shell commands
|
||||
- Xontribs is a 3rd-party extension system
|
||||
- Customizable tab completion, key bindings, color styles
|
||||
- Rich interface to discover history
|
||||
|
||||
**Installing Xonsh Shell**
|
||||
|
||||
Xonsh is available in the repos of many Linux distributions like Ubuntu, Fedora, etc. So, to install it on Ubuntu, run:
|
||||
|
||||
```
|
||||
sudo apt install xonsh
|
||||
```
|
||||
|
||||
Xonsh also provides an AppImage package, which can be downloaded from their download page. You may refer to our [AppImage guide][13] if you are new to the file format.
|
||||
|
||||
[Xonsh][14]
|
||||
|
||||
### 5. Hilbish
|
||||
|
||||
Hilbish is an **extensible shell** that is very customizable via the Lua programming language. The shell is aimed at both casual users and power users.
|
||||
|
||||
![hilbish shell][15]
|
||||
|
||||
Features of Hilbish
|
||||
|
||||
- Simple and Easy Scripting
|
||||
- History and Completion Menus: Provides the user with proper menus for completions and history searching
|
||||
- Syntax highlighting and hinting are available via the Lua API
|
||||
- It works on Unix systems and Windows, but on Windows, there may encounter issues.
|
||||
|
||||
**Installing Hilbish**
|
||||
|
||||
Hilbish is not available in the package repositories of Ubuntu. So, you will be building it from the source.
|
||||
|
||||
To install it, you need **Go and task** installed.
|
||||
|
||||
```
|
||||
sudo apt install golang-go
|
||||
sudo snap install task --classic
|
||||
```
|
||||
|
||||
Once the dependencies are installed, run the following commands to install Hilbish shell:
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/Rosettea/Hilbish
|
||||
cd Hilbish
|
||||
go get -d ./...
|
||||
```
|
||||
|
||||
If you want a stable branch, run these commands:
|
||||
|
||||
```
|
||||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
task build
|
||||
sudo task install
|
||||
```
|
||||
|
||||
[Hilbish][16]
|
||||
|
||||
### 6. Elvish
|
||||
|
||||
Elvish is an expressive programming language and a versatile interactive shell. It runs on Linux, Mac, and Windows. Even if **v1.0** has not been released, it is already suitable for most daily interactive use.
|
||||
|
||||
![elvish shell][17]
|
||||
|
||||
**Features of Elvish**
|
||||
|
||||
- **Powerful Pipelines:** Pipelines in Elvish can carry structured data, not just text. You can stream lists, maps, and even functions through the pipeline.
|
||||
- **Intuitive Control Structures**
|
||||
- **Directory History:** Elvish remembers all the directories you have been to. You can access it by pressing `CTRL+L`.
|
||||
- **Command History**
|
||||
- **Built-in File Manager:** Accessible by pressing CTRL + N
|
||||
|
||||
**Install Elvish**
|
||||
|
||||
Elvish shell is available in Ubuntu and Arch Linux package managers. So to install it, open a terminal and run:
|
||||
|
||||
```
|
||||
sudo apt install elvish
|
||||
```
|
||||
|
||||
[Elvish][18]
|
||||
|
||||
### 7. Oh
|
||||
|
||||
According to its developers, Oh is a reimagining of the Unix shell.
|
||||
|
||||
It aims to become a more powerful and robust replacement to modern options while respecting the conventions established by the Unix shell over the last half-century.
|
||||
|
||||
![][19]
|
||||
|
||||
**Features of Oh Shell**
|
||||
|
||||
- First-class channels, pipes, environments, and functions
|
||||
- Rich return values that work with standard shell constructs
|
||||
- Support for modularity.
|
||||
- A simplified set of evaluation and quoting rules.
|
||||
- A syntax that deviates as little as possible from established conventions;
|
||||
|
||||
**Installing Oh**
|
||||
|
||||
Oh provides a pre-compiled binary. You need to download it from their [official GitHub page][20].
|
||||
|
||||
You need to give execution permission to the file using the command:
|
||||
|
||||
```
|
||||
chmod +x filename
|
||||
```
|
||||
|
||||
Now, you can run it by :
|
||||
|
||||
```
|
||||
./<name of binary file>
|
||||
```
|
||||
|
||||
[Oh][21]
|
||||
|
||||
### 8. Solidity
|
||||
|
||||
Solidity is an interactive shell with lightweight session recording and remote compiler support. When you change the solidity pragma/language, it automatically fetches a matching remote compiler.
|
||||
|
||||
![][22]
|
||||
|
||||
**Features of Solidity**
|
||||
|
||||
- `pragma solidity <version>` attempts to dynamically load the selected compiler version
|
||||
- Sessions can be saved and restored using the `.session` command.
|
||||
- Settings are saved on exit (not safe when running concurrent shells).
|
||||
- `$_` is a placeholder for the last known result.
|
||||
- Special commands are dot-prefixed. Everything else is evaluated as Solidity code.
|
||||
|
||||
**Install Solidity**
|
||||
|
||||
You can install solidity shell through npm.
|
||||
|
||||
[Ensure you have the latest version of nodejs][23] and npm installed, then type the following command:
|
||||
|
||||
```
|
||||
npm install -g solidity-shell
|
||||
```
|
||||
|
||||
Once installed, run **solidity-shell** to start the session.
|
||||
|
||||
[Solidity Shell][24]
|
||||
|
||||
### 9. Yash
|
||||
|
||||
Yash, or yet another shell is a POSIX-compliant command line shell written in C99 (ISO/IEC 9899:1999). It has features for daily interactive and scripting use.
|
||||
|
||||
![][25]
|
||||
|
||||
**Features of Yash Shell**
|
||||
|
||||
- Global aliases
|
||||
- Socket redirection, pipeline redirection, and process redirection
|
||||
- Prompt command and command-not-found handler
|
||||
- Command line completion with predefined completion scripts for more than 100 commands
|
||||
- Command line prediction based on command history
|
||||
|
||||
**Installing Yash Shell**
|
||||
|
||||
To install the shell, you need to go to their [GitHub releases][26] page and download the tar file. Now extract the tar file; inside it, you will find an INSTALL file with instructions to install it.
|
||||
|
||||
Typically, you should execute the below command inside the extracted folder.
|
||||
|
||||
```
|
||||
./configure && make && sudo make install
|
||||
```
|
||||
|
||||
[Yash][27]
|
||||
|
||||
### Honorable Mentions
|
||||
|
||||
- **Ion:** [Ion Shell][28] is a modern system shell written in Rust, primarily for **RedoxOS**. It is still a work in progress, and users should expect syntax changes.
|
||||
- **Closh:** [Closh][29] is a bash-like shell that combines the best of traditional UNIX shells with the power of [Clojure][30]. It aims to be a modern alternative to bash. This, too, is in the early stages of development.
|
||||
- **Dash**: [Dash][31] is a POSIX-compliant, fast and lightweight shell from Debian.
|
||||
|
||||
💬 _What do you think about these shells listed? Would you experiment by changing the default shell to some of the options here? What's your favorite one? Share your thoughts in the comments box below._
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/shells-linux/
|
||||
|
||||
作者:[Sreenath][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/sreenath/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://itsfoss.com/content/images/2023/01/fish-shell.png
|
||||
[2]: https://fishshell.com/
|
||||
[3]: https://itsfoss.com/microsoft-open-sources-powershell/
|
||||
[4]: https://itsfoss.com/gui-cli-tui/
|
||||
[5]: https://itsfoss.com/content/images/2023/01/nushell.png
|
||||
[6]: https://github.com/nushell/nushell
|
||||
[7]: https://itsfoss.com/homebrew-linux/
|
||||
[8]: https://www.nushell.sh/
|
||||
[9]: https://itsfoss.com/content/images/2023/01/dunesh.png
|
||||
[10]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/
|
||||
[11]: https://github.com/adam-mcdaniel/dune
|
||||
[12]: https://itsfoss.com/content/images/2023/01/xonsh.png
|
||||
[13]: https://itsfoss.com/use-appimage-linux/
|
||||
[14]: https://xon.sh/
|
||||
[15]: https://itsfoss.com/content/images/2023/01/hilbish.png
|
||||
[16]: https://rosettea.github.io/Hilbish/
|
||||
[17]: https://itsfoss.com/content/images/2023/01/elvish.png
|
||||
[18]: https://elv.sh/
|
||||
[19]: https://itsfoss.com/content/images/2023/01/oh_Shell.png
|
||||
[20]: https://github.com/michaelmacinnis/oh#linux
|
||||
[21]: https://github.com/michaelmacinnis/oh
|
||||
[22]: https://itsfoss.com/content/images/2023/01/solidity-shell.png
|
||||
[23]: https://itsfoss.com/install-nodejs-ubuntu/
|
||||
[24]: https://github.com/tintinweb/solidity-shell
|
||||
[25]: https://itsfoss.com/content/images/2023/01/yash.png
|
||||
[26]: https://github.com/magicant/yash/releases/tag/2.53
|
||||
[27]: https://yash.osdn.jp/index.html.en
|
||||
[28]: https://gitlab.redox-os.org/redox-os/ion
|
||||
[29]: https://github.com/dundalek/closh
|
||||
[30]: https://clojure.org/
|
||||
[31]: https://linuxhandbook.com/dash-shell/
|
||||
|
Loading…
Reference in New Issue
Block a user