更新 fish 配置,优化命令缩写以支持 bat、batcat、fd 和 fdfind 的优先使用
This commit is contained in:
@@ -11,9 +11,21 @@ if status is-interactive
|
|||||||
abbr la exa -a
|
abbr la exa -a
|
||||||
end
|
end
|
||||||
|
|
||||||
type -q bat; and abbr cat bat
|
# cat/cap:优先 bat,Debian/Ubuntu 等可能仅提供 batcat
|
||||||
type -q bat; and abbr cap bat -p
|
if type -q bat
|
||||||
type -q fd; and abbr find fd
|
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 rg; and abbr grep rg
|
||||||
type -q btop; and abbr top btop
|
type -q btop; and abbr top btop
|
||||||
type -q tldr; and abbr help tldr
|
type -q tldr; and abbr help tldr
|
||||||
|
|||||||
Reference in New Issue
Block a user