aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-11-20 22:12:31 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-11-20 22:12:31 -0500
commit408d71259bbd5bad7f1aa9a232904038f623598b (patch)
treeb51c066ea0154057943397a7da11e0115b18838d
parentd7b41ac77673a9205ba909aea524f267bf159e87 (diff)
Look for `~/.textadept/osx_env.sh` for OSX environment variables.
Also clarified `ta` launcher since `--help` is unavailable.
-rw-r--r--doc/02_Installation.md10
-rwxr-xr-xscripts/osx/ta6
-rwxr-xr-xscripts/osx/textadept_osx4
3 files changed, 13 insertions, 7 deletions
diff --git a/doc/02_Installation.md b/doc/02_Installation.md
index 353d0b81..3363f135 100644
--- a/doc/02_Installation.md
+++ b/doc/02_Installation.md
@@ -144,13 +144,13 @@ dock.
By default, Mac OSX GUI apps like Textadept do not see shell environment
variables like "$PATH". Consequently, any [modules][] that utilize programs
contained in "$PATH" (e.g. the progams in */usr/local/bin/*) for run and compile
-commands will not find those programs. Follow [these instructions][] to export
-the environment variables you need Textadept to see. At the very least, set
-"PATH" to be "$PATH". You must logout and log back in before the changes take
-effect.
+commands will not find those programs. The solution is to create a
+*~/.textadept/osx_env.sh* file that exports all of the environment variables you
+need Textadept to see. For example:
+
+ export PATH=$PATH
[modules]: 07_Modules.html
-[these instructions]: http://developer.apple.com/library/mac/#qa/qa1067/_index.html
### Windows
diff --git a/scripts/osx/ta b/scripts/osx/ta
index 9b2d8f43..8cf9f28f 100755
--- a/scripts/osx/ta
+++ b/scripts/osx/ta
@@ -3,8 +3,10 @@
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "ta - shell script to launch Textadept.app"
- echo "Usage: ta [args] [filenames]"
- echo "Run textadept --help for available args."
+ echo "Usage:"
+ echo "ta [filenames] open the given filenames in Textadept"
+ echo "ta [args] [filenames] open the given filenames in a new instance of"
+ echo " Textadept with the given arguments"
elif [ "${1:0:1}" == "-" ]; then
open -n -a Textadept.app --args $@
else
diff --git a/scripts/osx/textadept_osx b/scripts/osx/textadept_osx
index d0382fa4..f04497e4 100755
--- a/scripts/osx/textadept_osx
+++ b/scripts/osx/textadept_osx
@@ -18,6 +18,10 @@ export CHARSETALIASDIR="$bundle_res/lib"
# Strip out the argument added by OSX.
if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then shift 1; fi
+# Source '~/.textadept/osx_env.sh' to set variables like $PATH when opening
+# Textadept.app from the Dock or the Finder.
+if [ -f $HOME/.textadept/osx_env.sh ]; then . $HOME/.textadept/osx_env.sh; fi
+
# Run Textadept.
textadept=textadept
if [ ! -z $TEXTADEPTJIT ]; then textadept=textadeptjit; fi