-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2007 from gaelicWizard/plugin-latex
Plugin/LaTeX: 2009 was thirteen years ago
- Loading branch information
Showing
2 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
cite about-plugin | ||
about-plugin 'use mactex' | ||
# shellcheck shell=bash | ||
about-plugin 'add MacTeX to PATH' | ||
|
||
_bash_it_plugin_latex_paths=( | ||
# Standard locations | ||
/usr/local/texbin | ||
# MacOS locations | ||
/Library/TeX/texbin | ||
) | ||
|
||
# add mactex to the path if its present | ||
MACTEX_PATH=/usr/local/texlive/2009/bin/universal-darwin | ||
if [[ -d $MACTEX_PATH ]]; then | ||
pathmunge $MACTEX_PATH after | ||
fi | ||
unset MACTEX_PATH | ||
for _bash_it_plugin_latex_path in "${_bash_it_plugin_latex_paths[@]}"; do | ||
if [[ -d "$_bash_it_plugin_latex_path/" ]]; then | ||
pathmunge "$_bash_it_plugin_latex_path" after && break | ||
fi | ||
done | ||
|
||
# Cleanup | ||
unset "${!_bash_it_plugin_latex_@}" |