My Terminal Setup

My Terminal Setup

General Terminal Settings

Having a well-configured terminal setup can significantly enhance your productivity and make your development or command-line tasks more enjoyable. In this article, I'll walk you through my personal terminal setup, covering the font, theme, prompt, ZSH framework, essential tools/packages, and useful aliases and plugins.

While some users prefer terminal emulators like iTerm2 or Warp (it's just amazing) for their extensive feature sets, I have chosen to stick with my native terminal for a specific reason - the seamless integration with Visual Studio Code. As a developer, VSCode is my primary coding environment, and having a native terminal ensures a smooth and hassle-free experience.

I prioritize both aesthetics and functionality. To achieve this, I use the FiraCode Nerd Font in size 12, which is patched by Nerd Font to include various programming ligatures and icons. The inclusion of icons enhances the visual appeal and helps quickly identify different file types.

For the theme, I've opted for the "Pro Theme" which provides a professional and minimalistic look, making it easier to focus on the content.

Terminal Settings

Oh My Zsh

To unlock the full potential of ZSH (Z Shell), I rely on the Oh My Zsh framework. It is a community-driven framework that offers a plethora of plugins, themes, and configurations to supercharge your ZSH experience.

Starship

The prompt (also known as the shell prompt) defines how the terminal prompt looks and behaves. Starship written in Rust, allows you to customize the prompt according to your preferences and displays relevant information like the current Git branch, package version, and system information.

Tools / Packages

1. Fig

Fig is a fantastic tool that enhances your shell autocompletion. It learns from your previous commands and suggests completions for commands, options, and arguments, saving you time and reducing typing errors.

2. Topgrade

Keeping your system and tools up-to-date is crucial for security and performance reasons. Topgrade is a fantastic tool that automates the update process for various package managers, including system packages, language-specific tools, and even GUI applications. With a single command, I can ensure everything is up to date effortlessly.

3. exa

Exa is a modern replacement for the classic 'ls' command. It adds color to the output, displays icons for different file types, and offers a more feature-rich and user-friendly listing of directories and files.

4. bat

Bat is a highly improved alternative to the 'cat' command. It not only displays the content of files but also adds syntax highlighting and line numbering, making code and text files more readable.

Bat

Aliases

Aliases are shortcuts for commands, making them easier to remember and type. You can add aliases by editing your .zshrc file. Here are some of the aliases I use:

  1. alias ls='exa --icons -a --group-directories-first': This alias replaces the traditional 'ls' command with 'exa', adding icons, showing hidden files, and grouping directories first.
  2. alias cat='bat': By setting this alias, whenever I use 'cat' to view file contents, it automatically invokes 'bat'.

ZSH Plugins

ZSH plugins provide additional functionality to the shell, making tasks more efficient and convenient. Here are some of the plugins I have integrated into my terminal setup:

  1. zsh-syntax-highlighting: Highlights the syntax of commands as you type, catching potential errors early on.
  2. zsh-autosuggestions: Suggests commands based on your history and current input, speeding up your workflow.
  3. colored-man-pages: Provides colored output for man pages, making them easier to read and understand.
  4. vscode: Provides several aliases for various VS Code commands.
  5. pnpm, yarn, npm: Aliases for package managers. For example, instead of typing 'pnpm install', I can simply type 'pin'.
  6. you-should-use: This reminds you that you should use one of your existing aliases for a command you just typed.
  7. command-not-found: Provide suggested packages to be installed if a command cannot be found.

With this finely tuned terminal setup, I can breeze through my daily tasks, whether it's coding, system administration, or just exploring the file system. By carefully selecting the right tools, fonts, themes, and plugins, you can create a terminal environment that aligns with your workflow and makes working in the command line a joyous experience. Happy coding!

Credit for the videos goes to the respective projects.

Reaching the Next Level?


I'm always looking for new challenges that can make a difference in our collective world. Feel free to shoot me an email! Whether you want to hire me, have a question or just want to say hi, I'll get back to you as soon as I can!

Engage with Me
GithubLinkedinTwitter
[email protected]