20 lines
654 B
Plaintext
20 lines
654 B
Plaintext
## 更新配置
|
||
dotu() {
|
||
# 使用 () 包裹命令会在子进程中运行,执行完后当前终端路径不会改变
|
||
(
|
||
cd "$HOME/.flinty" || exit
|
||
if git pull; then
|
||
echo "Git updated."
|
||
fi
|
||
)
|
||
|
||
# 在主进程刷新配置
|
||
source ~/.bash_profile
|
||
echo "Config reloaded successfully!"
|
||
}
|
||
|
||
## 替换默认 ssh 工具,Git Bash 里的 ssh client 连不上 Bitwarden 的 SSH Agent
|
||
alias ssh='/c/Windows/System32/OpenSSH/ssh.exe'
|
||
|
||
## 列出所有链接
|
||
alias sls="awk '/^Host / {host=\$2} /HostName/ {print \"\033[36m\" host \"\033[0m\t\033[90m\" \$2 \"\033[0m\"}' ~/.ssh/config | column -t -s $'\t'" |