From 4a6e940dcdcd43a066a109814482f30aa1080afa Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 27 Apr 2018 16:40:47 +0200 Subject: [PATCH] added share andthensome alias --- zsh/.zshrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 55d9eba..b442f21 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -90,6 +90,8 @@ source $ZSH/oh-my-zsh.sh transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://share.higherlearning.eu/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://share.higherlearning.eu/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } +transferats() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi +tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://share.andthensome.nl/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://share.andthensome.nl/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } # Emberjs settings export PATH="$PATH:/home/alrayyes/.config/yarn/global/node_modules/.bin:/home/alrayyes/bin"