Add a fish-like UX to zsh

This adds and configures the following packages:

* `zsh-history-substring-search` provides a substring search through history and suggests possible arguments
* `zsh-autosuggestions` gives suggestions during typing
* `zsh-syntax-highlighting` colors commands based on their syntax

Resolves #521
This commit is contained in:
Jonas Harer
2026-04-04 03:22:36 +00:00
committed by Thomas Duckworth
parent 120d0262b5
commit 647a1a14e2
2 changed files with 15 additions and 0 deletions

View File

@@ -59,4 +59,7 @@ Packages=
ydotool # Basic TUI and GUI app automation
zip # the `zip` CLI archiving tool
zsh
zsh-autosuggestions # fish-like suggestions
zsh-completions
zsh-history-substring-search # fish-like history search
zsh-syntax-highlighting # fish-like syntax highlighting

View File

@@ -79,6 +79,9 @@ compinit
# Disable tab cycling through completions.
zstyle ':completion:*' menu no
# Make completions case-insensitive.
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
# Add colored output for various commands.
alias ls='ls --color=auto'
alias grep='grep --color=auto'
@@ -100,3 +103,12 @@ add-zsh-hook preexec auto_chmod
# Wrap journal logs viewed in terminal rather than truncating; friendlier for reading
# and copying
export SYSTEMD_LESS=FRXMK
# Add autosuggestions, substring history search and syntax highlighting.
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
# Bind Ctrl+↑ and Ctrl+↓ keybinds to substring history search.
bindkey '^[[1;5A' history-substring-search-up # Ctrl+↑
bindkey '^[[1;5B' history-substring-search-down # Ctrl+↓