diff --git a/at.zsh b/at.zsh index 53f5998..4ad861d 100755 --- a/at.zsh +++ b/at.zsh @@ -11,10 +11,10 @@ host=( plc.directory ) lexicon=( - xrpc/com.atproto.repo.describeRepo - xrpc/com.atproto.repo.getRecord - xrpc/com.atproto.repo.listRecords - xrpc/com.atproto.identity.resolveHandle + /xrpc/com.atproto.repo.describeRepo + /xrpc/com.atproto.repo.getRecord + /xrpc/com.atproto.repo.listRecords + /xrpc/com.atproto.identity.resolveHandle ) function at-env(){ @@ -30,8 +30,8 @@ function at-uri-search(){ if [ -n "$1" ];then at_uri=$1 fi - req=xrpc/com.atproto.repo.getRecord - url=https://${host}/${req} + req=/xrpc/com.atproto.repo.getRecord + url=https://${host}${req} did=`echo $at_uri|cut -d / -f 3` collection=`echo $at_uri|cut -d / -f 4` rkey=`echo $at_uri|cut -d / -f 5` @@ -42,8 +42,8 @@ function at-did-search(){ if [ -n "$1" ];then handle=$1 fi - req=xrpc/com.atproto.repo.describeRepo - url=https://${host}/${req} + req=/xrpc/com.atproto.repo.describeRepo + url=https://${host}${req} curl -sL "$url?repo=$handle"|jq . } @@ -55,8 +55,8 @@ function at-collection-search(){ if [ "$2" = "-r" ];then reverse=true fi - req=xrpc/com.atproto.repo.listRecords - url=https://${host}/${req} + 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 .