From 7df9eb942a6f178e1bbbbb7dbc2470cd57ca213f Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Fri, 16 Jul 2021 15:29:08 +0800 Subject: New function: "share" uploads $1 to fkfd.me/static, then echoes the URL --- .zshrc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.zshrc') 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 -- cgit v1.2.3