Skip to content

4DERT/zsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

My ZSH Config

A clean, modern, and productivity-focused ZSH configuration optimized for daily development. It features fast fuzzy navigation, rich file previews, and an enhanced interactive experience.

🛠️ Installation & Setup

Follow these steps as outlined in the configuration:

1. Create the configuration directory

mkdir -p "$HOME/.zsh"

2. Install the Pure Prompt

You can clone the prompt directly from the source:

git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure"

Note on Backups: This repository includes a .zsh.tar.gz file. This serves as a backup of the required components (including the Pure prompt) in case the original repositories become unavailable. You can extract it using tar -xzf .zsh.tar.gz -C ~/.

3. Deploy the configuration

Copy the .zshrc file to your home directory:

cp .zshrc ~/

4. Change your default shell

Set ZSH as your default shell by running:

chsh -s /bin/zsh

📦 Dependencies

The following tools are required for the full experience:

Core Plugins & Prompt

  • Pure: A minimalist, fast ZSH prompt.
  • zsh-syntax-highlighting: Provides fish-shell-like syntax highlighting.
  • zsh-autosuggestions: Suggests commands based on your history.

CLI Utilities

  • fzf: Command-line fuzzy finder.
  • zoxide: A smarter cd replacement.
  • eza: A modern replacement for ls.
  • bat: A cat clone with syntax highlighting.
  • fd: A fast alternative to find.
  • jq: Lightweight JSON processor.
  • bind (dig): Used for DNS lookups in SSH previews.
  • wl-clipboard / xclip: Clipboard support for Wayland or X11.

Installation Commands

Arch Linux (using yay):

yay -S zsh zsh-syntax-highlighting zsh-autosuggestions zoxide bat fzf fd eza jq bind-tools wl-clipboard ttf-jetbrains-mono-nerd

Debian / Ubuntu:

sudo apt install zsh zsh-syntax-highlighting zsh-autosuggestions zoxide bat fzf fd-find eza jq dnsutils wl-clipboard

✨ Features & Key Bindings

Fuzzy Finding (FZF)

  • File/Dir Previews: Uses bat for files and eza for directories during searches.

  • Ctrl + T: Search for files and insert the path into the command line.

  • Alt + C: Search for a directory and cd into it.

  • Custom Previews:

    • cd: Previews directory trees.
    • ssh: Previews host info via dig.
    • export/unset: Previews environment variables.

Navigation & Editing

  • Zoxide: Enhanced cd that learns your habits.
  • Ctrl + Space: Accept the current auto-suggestion.
  • Ctrl + Left/Right: Move the cursor word by word.
  • Ctrl + Backspace: Delete a whole word.
  • Ctrl + X, e: Open the current command line in Neovim for advanced editing.

Git Snippets (Hotkeys)

  • Ctrl + X, g, c: Inserts git commit -m "" and places the cursor inside the quotes.
  • Ctrl + X, g, p: Inserts git push origin .
  • Ctrl + X, g, s: Runs git status.
  • Ctrl + X, g, l: Displays the last 10 one-line log entries.

Helper Functions

  • Archive Extraction: Use ex <file> to automatically extract any archive format (zip, tar.gz, 7z, rar, etc.).
  • JSON Viewer: Use jsonview <file> (or simply open a .json file) to view formatted JSON via jq and bat.
  • Suffix Aliases: Files like .md, .py, .rs, or .js can be "executed" to open them directly in bat or your $EDITOR.

About

My ZSH config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages