diff --git a/Commands/Apex Reference.tmCommand b/Commands/Apex Reference.tmCommand
index bd30449..e9d3071 100644
--- a/Commands/Apex Reference.tmCommand
+++ b/Commands/Apex Reference.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='http://www.salesforce.com/us/developer/docs/apexcode/index.htm'</script>"
diff --git a/Commands/Build All.tmCommand b/Commands/Build All.tmCommand
index ff02a0c..f3a6efd 100644
--- a/Commands/Build All.tmCommand
+++ b/Commands/Build All.tmCommand
@@ -6,7 +6,7 @@
nop
command
echo "<h1>Building Project</h1>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
echo "<div style='background-color:#ccc'><pre>;"
. build.properties
if[ ! -f "new.properties"]
diff --git a/Commands/Build File.tmCommand b/Commands/Build File.tmCommand
index a01491e..95a5527 100644
--- a/Commands/Build File.tmCommand
+++ b/Commands/Build File.tmCommand
@@ -46,7 +46,7 @@ fi
fi
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
diff --git a/Commands/Build Latest.tmCommand b/Commands/Build Latest.tmCommand
index 0df57d3..26d8c7a 100644
--- a/Commands/Build Latest.tmCommand
+++ b/Commands/Build Latest.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
then
@@ -29,7 +29,7 @@ cd ..
echo "<h1>Building Latest</h1>"
echo "<pre>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
cd classes
for file in $(find . -name "*.cls" -mtime -1)
diff --git a/Commands/Build Sequential.tmCommand b/Commands/Build Sequential.tmCommand
index e342060..ad15d35 100644
--- a/Commands/Build Sequential.tmCommand
+++ b/Commands/Build Sequential.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
then
diff --git a/Commands/Custom Labels.tmCommand b/Commands/Custom Labels.tmCommand
index dc0eee6..e83b6dc 100644
--- a/Commands/Custom Labels.tmCommand
+++ b/Commands/Custom Labels.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/101'</script>"
diff --git a/Commands/Debug Logs.tmCommand b/Commands/Debug Logs.tmCommand
index 5d6c7a2..2dc4f4b 100644
--- a/Commands/Debug Logs.tmCommand
+++ b/Commands/Debug Logs.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/setup/ui/listApexTraces.apexp'</script>"
diff --git a/Commands/Delete Except.tmCommand b/Commands/Delete Except.tmCommand
index feb77c8..3b62c4c 100644
--- a/Commands/Delete Except.tmCommand
+++ b/Commands/Delete Except.tmCommand
@@ -5,7 +5,8 @@
beforeRunningCommand
nop
command
- for file in $(find . -name "*.cls*")
+ cd "${TM_PROJECT_DIRECTORY}"
+for file in $(find . -name "*.cls*")
do
if [[ $file != *$TM_SELECTED_TEXT* ]]
then
diff --git a/Commands/Execute:Debug Apex.tmCommand b/Commands/Execute:Debug Apex.tmCommand
index fe420ca..a20646e 100644
--- a/Commands/Execute:Debug Apex.tmCommand
+++ b/Commands/Execute:Debug Apex.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/_ui/common/apex/debug/ApexCSIPage'</script>"
diff --git a/Commands/Get Latest.tmCommand b/Commands/Get Latest.tmCommand
index c005988..b51c8b0 100644
--- a/Commands/Get Latest.tmCommand
+++ b/Commands/Get Latest.tmCommand
@@ -8,7 +8,7 @@
echo "<h1>Getting Latest From Server</h1>"
echo "<div style='border:1px solid #ccc; padding: 5px;'><pre>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ! -f "new.properties" ]
then
diff --git a/Commands/Get Object.tmCommand b/Commands/Get Object.tmCommand
index 464bad7..9f0669a 100644
--- a/Commands/Get Object.tmCommand
+++ b/Commands/Get Object.tmCommand
@@ -6,7 +6,7 @@
nop
command
#get username and password from project
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ${usekeychainaccess} == 'enabled' ]
@@ -42,6 +42,7 @@ fi
#make REST callout
echo "data = " > data.json
data=$(curl -s https://${pod}.salesforce.com/services/data/v20.0/sobjects/${TM_SELECTED_TEXT}/describe -H "Authorization: OAuth ${session}" -H "X-PrettyPrint:1")
+echo $data
echo $data >> data.json
#check to see if session expired
@@ -64,7 +65,7 @@ echo "<script>window.location = 'file://${dir}/objectinfo.html'</script
#cleanup
sleep 1
-rm data.json
+#rm data.json
input
diff --git a/Commands/Go To Record.tmCommand b/Commands/Go To Record.tmCommand
index 9a834d2..0413ae5 100644
--- a/Commands/Go To Record.tmCommand
+++ b/Commands/Go To Record.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>document.title = '${TM_SELECTED_TEXT}'</script>"
echo "<script>window.location.href='https://${pod}.salesforce.com/${TM_SELECTED_TEXT}'</script>"
diff --git a/Commands/Go To Visualforce Page.tmCommand b/Commands/Go To Visualforce Page.tmCommand
index 20fc3e2..32e916e 100644
--- a/Commands/Go To Visualforce Page.tmCommand
+++ b/Commands/Go To Visualforce Page.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
pagename=${TM_SELECTED_TEXT:-$TM_FILENAME}
echo "<script>document.title = '${pagename%.*}'</script>"
diff --git a/Commands/Logout.tmCommand b/Commands/Logout.tmCommand
index 8adeead..a3079f9 100644
--- a/Commands/Logout.tmCommand
+++ b/Commands/Logout.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/secur/logout.jsp'</script>"
diff --git a/Commands/New Custom Object.tmCommand b/Commands/New Custom Object.tmCommand
index 7322e4c..bf9a6e4 100644
--- a/Commands/New Custom Object.tmCommand
+++ b/Commands/New Custom Object.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/01I/e?setupid=CustomObjects'</script>"
diff --git a/Commands/New Debug Log.tmCommand b/Commands/New Debug Log.tmCommand
index f84b97a..1f8059c 100644
--- a/Commands/New Debug Log.tmCommand
+++ b/Commands/New Debug Log.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/p/setup/layout/AddApexDebugLogUser'</script>"
diff --git a/Commands/Production Deploy.tmCommand b/Commands/Production Deploy.tmCommand
index 4b9ed21..1b02bd4 100644
--- a/Commands/Production Deploy.tmCommand
+++ b/Commands/Production Deploy.tmCommand
@@ -7,7 +7,7 @@
command
echo "<h1>Getting Latest From Server</h1>"
echo "<div style='border:1px solid #ccc; padding: 5px;'><pre>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if[ ! -f "new.properties"]
diff --git a/Commands/Production Test.tmCommand b/Commands/Production Test.tmCommand
index 0c37d4b..0a00d5c 100644
--- a/Commands/Production Test.tmCommand
+++ b/Commands/Production Test.tmCommand
@@ -7,7 +7,7 @@
command
echo "<h1>Getting Latest From Server</h1>"
echo "<div style='border:1px solid #ccc; padding: 5px;'><pre>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if[ ! -f "new.properties"]
diff --git a/Commands/Run Current Tests.tmCommand b/Commands/Run Current Tests.tmCommand
index 0a65bd4..87171b4 100644
--- a/Commands/Run Current Tests.tmCommand
+++ b/Commands/Run Current Tests.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
echo "<h1>Running Tests for ${TM_FILENAME%.*}</h1>"
cp build.xml backup-build.xml
diff --git a/Commands/Run SOQL.tmCommand b/Commands/Run SOQL.tmCommand
index c7dabf1..82de4d0 100644
--- a/Commands/Run SOQL.tmCommand
+++ b/Commands/Run SOQL.tmCommand
@@ -6,7 +6,7 @@
nop
command
#get username and password from project
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if [ ${usekeychainaccess} == 'enabled' ]
then
@@ -42,6 +42,7 @@ query=$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "${TM_SELECTED_TEXT}
echo $query > query
echo "data = " > data.json
data=$(curl -s https://${pod}.salesforce.com/services/data/v22.0/query/?q=${query} -H "Authorization: OAuth ${session}" -H "X-PrettyPrint:1")
+echo $data
echo $data >> data.json
#check to see if session expired
diff --git a/Commands/Run Tests.tmCommand b/Commands/Run Tests.tmCommand
index 3b3e6da..c8e6a94 100644
--- a/Commands/Run Tests.tmCommand
+++ b/Commands/Run Tests.tmCommand
@@ -7,7 +7,7 @@
command
echo "<h1>Running All Tests</h1>"
echo "<div style='border:1px solid #ccc; padding: 5px; font-size: 9px'><pre>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
. build.properties
if[ ! -f "new.properties"]
diff --git a/Commands/Start New Project.tmCommand b/Commands/Start New Project.tmCommand
index 5449425..db92381 100644
--- a/Commands/Start New Project.tmCommand
+++ b/Commands/Start New Project.tmCommand
@@ -6,7 +6,7 @@
nop
command
echo "<h1>Creating new project</h1>"
-cd $TM_PROJECT_DIRECTORY
+cd "${TM_PROJECT_DIRECTORY}"
mkdir classes
mkdir components
diff --git a/Commands/Visualforce Reference.tmCommand b/Commands/Visualforce Reference.tmCommand
index ae0ff69..84937e2 100644
--- a/Commands/Visualforce Reference.tmCommand
+++ b/Commands/Visualforce Reference.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- cd $TM_PROJECT_DIRECTORY
+ cd "${TM_PROJECT_DIRECTORY}"
. build.properties
echo "<script>window.location.href='https://${pod}.salesforce.com/apexpages/apexcomponents.apexp'</script>"