From b7478f27e0ee9d01b57b03cbd22d984ed7052864 Mon Sep 17 00:00:00 2001 From: Erystasius Date: Mon, 23 Mar 2026 01:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20fish=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dot_config/fish/config.fish | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish index 115c8ab..040a30d 100644 --- a/dot_config/fish/config.fish +++ b/dot_config/fish/config.fish @@ -1,19 +1,21 @@ if status is-interactive - # Commands to run in interactive sessions can go here + # Abbreviations (only when target commands exist) + if type -q eza + abbr ls eza + else if type -q exa + abbr ls exa + end + type -q bat; and abbr cat bat + type -q bat; and abbr cap bat -p + type -q fd; and abbr find fd + type -q rg; and abbr grep rg + type -q btop; and abbr top btop + type -q tldr; and abbr help tldr + type -q chezmoi; and abbr cz chezmoi + + type -q thefuck; and thefuck --alias | source + + type -q zoxide; and zoxide init --cmd=cd fish | source + + type -q fastfetch; and fastfetch end - -# Aliases -alias ls=exa -alias cat=bat -alias cap='cat -p' -alias find=fd -alias grep=rg -alias top=btop -alias help=tldr -abbr cz chezmoi - -thefuck --alias | source - -zoxide init fish | source - -fastfetch