summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2021-07-16 15:29:08 +0800
committerFrederick Yin <fkfd@fkfd.me>2021-07-16 15:29:08 +0800
commit7df9eb942a6f178e1bbbbb7dbc2470cd57ca213f (patch)
treed6c8a04ef20136bb486994751b5d46a5aabf136d
parentcdf6a1abbbc37501a667edebfaf268044feed1a0 (diff)
New function: "share"
uploads $1 to fkfd.me/static, then echoes the URL
-rw-r--r--.zshrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index e9db761..a370f10 100644
--- a/.zshrc
+++ b/.zshrc
@@ -6,6 +6,7 @@ plugins=(
git
python
pj
+ urltools
)
source $ZSH/oh-my-zsh.sh
@@ -16,6 +17,12 @@ export PROJECT_PATHS=(~/Projects/ ~/Projects/_cloned/ ~/Projects/_archive/)
export GOPROXY=https://proxy.golang.com.cn,direct
export PATH="$HOME/.local/bin:$PATH"
+# utilities
+share () {
+ scp -r $1 www@fkfd.me:www/static/
+ echo "https://fkfd.me/static/$(urlencode $(basename $1))"
+}
+
# ibus
alias ib="ibus-daemon -d"
export GTK_IM_MODULE=ibus