Compare commits
2 Commits
e1117a254c
...
c5cc702462
| Author | SHA1 | Date | |
|---|---|---|---|
| c5cc702462 | |||
| e08364e93b |
@@ -8,6 +8,7 @@
|
|||||||
- **ripgrep (rg)** - 替代 `grep`
|
- **ripgrep (rg)** - 替代 `grep`
|
||||||
- **btop** - 替代 `top`
|
- **btop** - 替代 `top`
|
||||||
- **tldr** - 替代 `man`
|
- **tldr** - 替代 `man`
|
||||||
|
- **fzf** - 模糊搜索工具
|
||||||
|
|
||||||
## 其他工具
|
## 其他工具
|
||||||
- **Fish Shell** - 现代化 shell
|
- **Fish Shell** - 现代化 shell
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ if status is-interactive
|
|||||||
type -q tmux; and abbr tmn 'tmux new'
|
type -q tmux; and abbr tmn 'tmux new'
|
||||||
type -q tmux; and abbr tma 'tmux attach'
|
type -q tmux; and abbr tma 'tmux attach'
|
||||||
type -q tmux; and abbr tml 'tmux list-sessions'
|
type -q tmux; and abbr tml 'tmux list-sessions'
|
||||||
|
type -q docker; and abbr d docker
|
||||||
|
type -q docker-compose; and abbr dc 'docker-compose'
|
||||||
|
|
||||||
|
# systemd 常用缩写
|
||||||
|
type -q systemctl; and abbr sc systemctl
|
||||||
|
type -q systemctl; and abbr scu 'systemctl --user'
|
||||||
|
type -q journalctl; and abbr jc journalctl
|
||||||
|
type -q journalctl; and abbr jcu 'journalctl --user'
|
||||||
|
|
||||||
# ========= thefuck:自动命令纠错 =========
|
# ========= thefuck:自动命令纠错 =========
|
||||||
type -q thefuck; and thefuck --alias | source
|
type -q thefuck; and thefuck --alias | source
|
||||||
|
|||||||
@@ -17,17 +17,32 @@ if [ "$(id -u)" -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v pacman >/dev/null 2>&1; then
|
if command -v pacman >/dev/null 2>&1; then
|
||||||
# Arch/Manjaro:先同步并升级系统,再安装所需包
|
echo "检测到 pacman,开始安装 Arch/Manjaro 包..."
|
||||||
|
echo "更新系统包..."
|
||||||
$SUDO pacman -Syu --noconfirm
|
$SUDO pacman -Syu --noconfirm
|
||||||
$SUDO pacman -S --noconfirm exa zoxide dust bat btop fd ripgrep fzf tldr git vim tmux
|
echo "安装 Bash 常用命令增强/替代工具..."
|
||||||
|
$SUDO pacman -S --noconfirm zoxide exa bat fd ripgrep btop tldr fzf
|
||||||
|
echo "安装其他常用工具..."
|
||||||
|
$SUDO pacman -S --noconfirm git vim tmux fish fastfetch thefuck
|
||||||
|
echo "Arch/Manjaro 包安装完成!"
|
||||||
elif command -v apt >/dev/null 2>&1; then
|
elif command -v apt >/dev/null 2>&1; then
|
||||||
# Debian/Ubuntu:更新索引后再安装
|
echo "检测到 apt,开始安装 Debian/Ubuntu 包..."
|
||||||
|
echo "更新包索引..."
|
||||||
$SUDO apt update -y || true
|
$SUDO apt update -y || true
|
||||||
$SUDO apt install -y fzf zoxide ripgrep bat fd-find btop exa git vim tmux
|
echo "安装 Bash 常用命令增强/替代工具..."
|
||||||
|
$SUDO apt install -y zoxide exa bat fd-find ripgrep btop tldr fzf
|
||||||
|
echo "安装其他常用工具..."
|
||||||
|
$SUDO apt install -y git vim tmux fish fastfetch thefuck
|
||||||
|
echo "Debian/Ubuntu 包安装完成!"
|
||||||
elif command -v dnf >/dev/null 2>&1; then
|
elif command -v dnf >/dev/null 2>&1; then
|
||||||
# Fedora:更新元数据后再安装
|
echo "检测到 dnf,开始安装 Fedora 包..."
|
||||||
|
echo "更新包元数据..."
|
||||||
$SUDO dnf makecache -y || true
|
$SUDO dnf makecache -y || true
|
||||||
$SUDO dnf install -y exa zoxide dust bat btop fd-find ripgrep fzf tldr git vim tmux
|
echo "安装 Bash 常用命令增强/替代工具..."
|
||||||
|
$SUDO dnf install -y zoxide exa bat fd-find ripgrep btop tldr fzf
|
||||||
|
echo "安装其他常用工具..."
|
||||||
|
$SUDO dnf install -y git vim tmux fish fastfetch thefuck
|
||||||
|
echo "Fedora 包安装完成!"
|
||||||
else
|
else
|
||||||
echo "未检测到 apt / pacman / dnf,跳过安装。" >&2
|
echo "未检测到 apt / pacman / dnf,跳过安装。" >&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user