Skip to content

Commit

Permalink
small update
Browse files Browse the repository at this point in the history
- support arg passed on commandline to directly filter search results
- if repo contains only prerelease versions, then fall back to the
  most recent beta instead of returning `null`
  • Loading branch information
luckman212 committed Aug 16, 2021
1 parent 5fe0038 commit 76e1634
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion obsidian-plugin-downloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function _fetchVersion {
(.tagName|test("alpha|beta|rc";"i")|not)
))[0] |
.tagName' <<<"$GQL_JSON" 2>/dev/null)
case $REPO_VER in
null|'') REPO_VER=$(jq -r '.data.repository.releases.nodes[0] | .tagName' <<<"$GQL_JSON" 2>/dev/null) ;;
esac
echo "$REPO_VER"
fi
}
Expand Down Expand Up @@ -90,7 +93,7 @@ done < <(
awk -v pfx=$pfx 'BEGIN { FS="\t" } { printf "%s/%s\t%s: %s\n",pfx,$1,$2,$3 }' |
sed $'s/\t/\u00a0\t/g' |
column -s$'\t' -t |
fzf -i --exact --multi --no-hscroll --no-mouse --no-select-1 \
fzf -i ${1:+-q $1} --exact --multi --no-hscroll --no-mouse --no-select-1 \
--delimiter $'\u00a0' \
--with-nth 1,2 \
--header="$FZF_HEADER" \
Expand Down

0 comments on commit 76e1634

Please sign in to comment.