Skip to content

Commit

Permalink
open entries in Zotero (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Sep 14, 2022
1 parent 9a2c478 commit 22d2d03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3057,6 +3057,10 @@ to set hotkey for Bibliography parsing</string>
<string>BibDesk</string>
<string>bibdesk</string>
</array>
<array>
<string>Zotero</string>
<string>zotero</string>
</array>
<array>
<string>Sublime Text</string>
<string>sublime</string>
Expand Down
6 changes: 3 additions & 3 deletions scripts/open-entry.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/zsh
# shellcheck disable=SC2154
# shellcheck disable=SC2154,SC2086
export PATH=/usr/local/bin/:/opt/homebrew/bin/:$PATH

LIBRARY="${bibtex_library_path/#\~/$HOME}"
Expand All @@ -15,11 +15,11 @@ elif [[ "$open_entries_in" == "sublime" ]]; then
elif [[ "$open_entries_in" == "vscode" ]]; then
code "$LIBRARY:$LINE_NO"
elif [[ "$open_entries_in" == "vim" ]]; then
# shellcheck disable=SC2086
vim +$LINE_NO "$LIBRARY"
elif [[ "$open_entries_in" == "neovim" ]]; then
# shellcheck disable=SC2086
nvim +$LINE_NO "$LIBRARY"
elif [[ "$open_entries_in" == "zotero" ]]; then
open "zotero://select/items/@$CITEKEY"
else
echo "$open_entries_in not a valid value for 'open_entries_in'."
fi

0 comments on commit 22d2d03

Please sign in to comment.