By Mahmoud Ashraf

New Frontend

As a software engineer, I spend most of my time in terminal emulators, so it is necessary to use efficient tools in efficient terminal emulators.

A lot of software written on Rust helps me do this. This article introduces these tools.

tl; dr

  • Alacritty uses gPU-accelerated cross-platform terminal emulators
  • Starship 🌌 is super fast, supports a variety of customized minimalist command-line prompts, and supports any shell
  • exa lsThe modern version
  • batSupport for more featurescatcloning
  • Delta git, diff output viewer
  • Zoxide allows faster browsing of the file system
  • Ripgrep searches directories recursively based on regular expressions
  • fdSimple, fast and user-friendlyfindsubstitute
  • Bottom – another cross-platform graphical process/system viewer
  • TLDR 📚 all written together terminal command quick check card
  • Spotify -tui Spotify client command line version 🚀
  • Gitui super 💥 fast Git character interface client

Alacritty

Let’s start with Alacritty, which is one of the fastest terminal emulators because it uses GPU rendering and it’s also cross-platform.

Color schemes, fonts, transparency, keyboard shortcuts and more can be customized.

Alacritty doesn’t support synthetes, but you can use the synthetic-supported branch. If you use Arch, you can also install from aur.

Starship

My previous command line prompt used ZSH + PowerLevel9k and later switched to PowerLevel10k, but I observed delays when opening new shells. Starship can start up immediately.

It can be used with any shell, such as bash, ZSH, fish, and even powerShell.

The screenshot below shows my customized prompt.

Exa

Exa is an implementation of the ls command, but it comes with colors and ICONS and renders very quickly.

I created an alias and used exa instead of ls.

if [ "$(command -v exa)" ]; then
    unalias -m 'll'
    unalias -m 'l'
    unalias -m 'la'
    unalias -m 'ls'
    alias ls='exa -G --color auto --icons -a -s type'
    alias ll='exa -l --color always --icons -a -s type'
fi
Copy the code

My ls and ll commands show the result:

Bat

Bat is an implementation of the cat command, but with syntax highlighting.

I also gave it a different name (I used the Nord theme).

if [ "$(command -v bat)" ]; then
  unalias -m 'cat'
  alias cat='bat -pp --theme="Nord"'
fi
Copy the code

Delta

Delta enhances git diff display, including syntax highlighting, line numbers, and double-column display.

To use delta, add.gitconfig:

[core]
  pager = delta
[interactive]
  diffFilter = delta --color-only
[delta]
  side-by-side = true
  line-numbers-left-format = ""
  line-numbers-right-format = "│"
  syntax-theme = Nord
Copy the code

In the above configuration, delta becomes the default pager for git command output, turns on the two-column display, and sets the subject to Nord. You can run the following command to list all the topics and select the one you want to use.

delta --list-syntax-themes
Copy the code

Zoxide

I didn’t use any file browser, just CD and LS.

For example, I have a projects directory in my home directory, and if I want to access one of those projects, I need to type

cd ~/projects/mahmoudashraf.dev
Copy the code

With Zoxide, only the first input is required

z ~/projects/mahmoudashraf.dev
Copy the code

Then, wherever the current directory is, you can access it again with a few letters

z mah
Copy the code

Ripgrep

This is a cross-platform command line tool that uses regular expressions to search the contents of files in directories.

Ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}

Here are some examples:

Rg TJS "import React" rg "\.content" -g "*.pug" Rg fast readme. md --replace fastCopy the code

Fd

Friendlier and faster than the find command.

By default, files specified in.gitignore to be ignored are ignored.

For example, to convert some PNG files to JPEG:

fd -e png -x convert {} {.}.jpeg
Copy the code

Or deleting a file:

fd -H '^\.DS_Store$' -tf -X rm
Copy the code

bottom

It’s not top 😀, it’s bottom.

It is a cross-platform system monitor.

Tldr

TLDR provides a quick check card for various command-line tools to save time reading the full MAN help manual.

More tools

  • If Spotify’s official app is too bulky for you, you can use itspotify-tuiThis lightweight alternative.
  • If you like to use Git from the UI, check it outgitui.

There are many other command-line tools and other tools written in Rust, see lib.rs/command-lin… .