zshrc: add putdir function
recursively HTTP PUT a whole directory
This commit is contained in:
parent
fcde6e924e
commit
057e9b582c
1
.zshrc
1
.zshrc
|
@ -19,6 +19,7 @@ base58gen() { echo $(base64 /dev/urandom | tr -d "\n/+Il0O$2" | head -c ${$(($1/
|
|||
vid() { echo "VULP$(base64 /dev/urandom | tr -d "\n/+I0Oa-z" | head -c 17)" ; }
|
||||
tuch() { touch "$@" ; chmod 755 "$@" ; ${EDITOR:-vim} "$@" ; }
|
||||
rot13() { tr 'a-zA-Z' 'n-za-mN-ZA-M' ; }
|
||||
putdir(){ find "${@:2}" | while IFS= read fname ; do curl -X PUT --data-binary "@$fname" "$1$fname" ; done ; }
|
||||
meili() { curl -X POST "http://$1:7700/indexes/$2?$3" -H 'Content-Type: application/json' --data-binary @- ; }
|
||||
meiliset() { curl -X PATCH "http://$1:7700/indexes/$2/settings" -H 'Content-Type: application/json' --data-binary @- ; }
|
||||
meilit() { curl "http://$1:7700/tasks/$2" ; }
|
||||
|
|
Loading…
Reference in New Issue