fix
This commit is contained in:
parent
14dee0d584
commit
9894e5b781
18
at.zsh
18
at.zsh
@ -46,6 +46,21 @@ function at-did-search(){
|
||||
curl -sL "$url?repo=$handle"|jq .
|
||||
}
|
||||
|
||||
function at-collection-search(){
|
||||
reverse=false
|
||||
if [ -n "$1" ];then
|
||||
at_uri=$1
|
||||
fi
|
||||
if [ "$2" = "-r" ];then
|
||||
reverse=true
|
||||
fi
|
||||
req=xrpc/com.atproto.repo.listRecords
|
||||
url=https://${host}/${req}
|
||||
did=`echo $at_uri|cut -d / -f 3`
|
||||
collection=`echo $at_uri|cut -d / -f 4`
|
||||
curl -sL "$url?repo=$did&collection=$collection&reverse=$reverse"|jq .
|
||||
}
|
||||
|
||||
at-env
|
||||
case $1 in
|
||||
uri|u)
|
||||
@ -54,6 +69,9 @@ case $1 in
|
||||
did|d)
|
||||
at-did-search $2
|
||||
;;
|
||||
collection|c)
|
||||
at-collection-search $2 $3
|
||||
;;
|
||||
*)
|
||||
echo "${help[@]}"
|
||||
echo "${host[@]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user