feat: add nosudo

This commit is contained in:
2026-06-25 10:46:07 +08:00
parent 0e7fe55474
commit e8aae9738b
9 changed files with 358 additions and 55 deletions
+13
View File
@@ -14,5 +14,18 @@ else
echo "[zsh] Oh My Zsh 未安装,请运行: bash ~/.dotfile/script/zsh-init.sh" >&2
fi
# 复制当前 git 分支名到剪贴板(macOS / Linux)
gitb() {
git branch --show-current | tr -d '\n' | clip-copy.sh
}
# 复制当前目录到剪贴板(macOS / Linux)
pwdc() {
local dir
dir="$(pwd -P)"
printf '%s' "$dir" | clip-copy.sh || return 1
echo "Copied: ${dir/#$HOME/~}"
}
# 本机私有配置(不纳入 dotfile)
[[ -f "$HOME/.zshrc.local" ]] && source "$HOME/.zshrc.local"