diff --git a/src/index.html b/src/index.html
index 7352755..fc8525d 100644
--- a/src/index.html
+++ b/src/index.html
@@ -44,7 +44,7 @@ include "includes/head.html"
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt https://transfer.sh/66nb8/hello.txt
- # Using the alias
+ # Using the shell function
$ transfer hello.txt
##################################################### 100.0% https://transfer.sh/eibhM/hello.txt
@@ -151,16 +151,17 @@ include "includes/head.html"
- # Add this to .bashrc or its equivalent
-
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://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
+ # Add this to .bashrc or .zshrc or its equivalent
+ transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null,;;else cat "$file"|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;}
- # Now you can use transfer command
+
+ # Now you can use transfer function
$ transfer hello.txt
- # Transfer and send email with link (uses alias)
+ # Transfer and send email with link (uses shell function)
$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com