From a323153e5d3716120428b31bfae2f2d70d5e704d Mon Sep 17 00:00:00 2001 From: Erystasius Date: Thu, 2 Apr 2026 00:48:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20fish=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E5=91=BD=E4=BB=A4=E7=BC=A9=E5=86=99?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=20bat=E3=80=81batcat=E3=80=81fd=20?= =?UTF-8?q?=E5=92=8C=20fdfind=20=E7=9A=84=E4=BC=98=E5=85=88=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dot_config/fish/config.fish | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish index 3b229d0..e7cdf22 100644 --- a/dot_config/fish/config.fish +++ b/dot_config/fish/config.fish @@ -11,9 +11,21 @@ if status is-interactive abbr la exa -a end - type -q bat; and abbr cat bat - type -q bat; and abbr cap bat -p - type -q fd; and abbr find fd + # cat/cap:优先 bat,Debian/Ubuntu 等可能仅提供 batcat + if type -q bat + abbr cat bat + abbr cap bat -p + else if type -q batcat + abbr cat batcat + abbr cap batcat -p + end + # find:优先 fd;仅存在 fdfind 时(如 Debian/Ubuntu)用其并补 fd 缩写 + if type -q fd + abbr find fd + else if type -q fdfind + abbr find fdfind + abbr fd fdfind + end type -q rg; and abbr grep rg type -q btop; and abbr top btop type -q tldr; and abbr help tldr