File tree 2 files changed +18
-7
lines changed
2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ plugins/available/hub.plugin.bash
103
103
plugins/available/java.plugin.bash
104
104
plugins/available/jekyll.plugin.bash
105
105
plugins/available/jump.plugin.bash
106
+ plugins/available/latex.plugin.bash
106
107
plugins/available/less-pretty-cat.plugin.bash
107
108
plugins/available/man.plugin.bash
108
109
plugins/available/nginx.plugin.bash
Original file line number Diff line number Diff line change 1
- cite about-plugin
2
- about-plugin ' use mactex'
1
+ # shellcheck shell=bash
2
+ about-plugin ' add MacTeX to PATH'
3
+
4
+ _bash_it_plugin_latex_paths=(
5
+ # Standard locations
6
+ /usr/local/texbin
7
+ # MacOS locations
8
+ /Library/TeX/texbin
9
+ )
3
10
4
11
# add mactex to the path if its present
5
- MACTEX_PATH=/usr/local/texlive/2009/bin/universal-darwin
6
- if [[ -d $MACTEX_PATH ]]; then
7
- pathmunge $MACTEX_PATH after
8
- fi
9
- unset MACTEX_PATH
12
+ for _bash_it_plugin_latex_path in " ${_bash_it_plugin_latex_paths[@]} " ; do
13
+ if [[ -d " $_bash_it_plugin_latex_path /" ]]; then
14
+ pathmunge " $_bash_it_plugin_latex_path " after && break
15
+ fi
16
+ done
17
+
18
+ # Cleanup
19
+ unset " ${! _bash_it_plugin_latex_@ } "
You can’t perform that action at this time.
0 commit comments