zsh-shell-init/alias.d/script.sh

23 lines
870 B
Bash
Raw Permalink Normal View History

2023-09-13 17:10:07 +08:00
# shellcheck shell=ksh
# sync 同步脚本
alias syncggok="curl -o /Users/evlic/Library/Mobile\ Documents/iCloud~com~west2online~ClashX/Documents/ggok.self.yaml 'https://sub.evlic.cn/sub?target=clashr&new_name=true&url=https%3A%2F%2Fd.evlic.cn%2Fpublic%2Fconfig%2Fv2ray%2Fggok.ini&insert=false&config=config%2FACL4SSR.ini';scp /Users/evlic/Library/Mobile\ Documents/iCloud~com~west2online~ClashX/Documents/ggok* cloud:/home/d/public/config/clash/"
alias syncv2="ssh cloud 'source ~/.zshrc; curl -o /home/d/public/config/v2ray/ggok.ini https://rss.okggrss.buzz/link/07fnJG5GZQpc9KzD?mu=2'"
shell_dir="$HOME/.alias.d/opt"
up_notion() {
zsh "$shell_dir/notion_update.sh"
}
giff() {
fd=$(mktemp)
commit_id="$1"
if [ "$commit_id" == '' ]; then
commit_id="HEAD~1"
fi
git diff --stat "$commit_id" >> "$fd"
tail -n 1 "$fd"
rm "$fd"
}