diff --git a/commands/core/core.drush.inc b/commands/core/core.drush.inc
index 7fd679d..2b0d5eb 100644
--- a/commands/core/core.drush.inc
+++ b/commands/core/core.drush.inc
@@ -1011,7 +1011,10 @@ function drush_core_execute() {
   // The DRUSH_COMMAND_ARGS contain all args and options that appear after the command name.
   $args = drush_get_context('DRUSH_COMMAND_ARGS', array());
   for ($x = 0; $x < sizeof($args); $x++) {
-    $args[$x] = drush_escapeshellarg($args[$x]);
+    // escape all args except for command separators.
+    if (!in_array($args[$x], array('&&', '||', ';'))) {
+      $args[$x] = drush_escapeshellarg($args[$x]);
+    }
   }
   $cmd = implode(' ', $args);
   if ($alias = drush_get_context('DRUSH_TARGET_SITE_ALIAS')) {
@@ -1023,5 +1026,5 @@ function drush_core_execute() {
     }
   }
   // Must be a local command.
-  return (bool) !drush_op_system($cmd);
+  return drush_shell_proc_open($cmd);
 }
diff --git a/includes/command.inc b/includes/command.inc
index 70f0ae1..c65bcab 100644
--- a/includes/command.inc
+++ b/includes/command.inc
@@ -492,7 +492,7 @@ function drush_parse_args() {
       $command_args[] = $opt;
     }
     // Is the arg an option (starting with '-')?
-    if ($opt{0} == "-" && strlen($opt) != 1) {
+    if (!empty($opt) && $opt{0} == "-" && strlen($opt) != 1) {
       // Do we have multiple options behind one '-'?
       if (strlen($opt) > 2 && $opt{1} != "-") {
         // Each char becomes a key of its own.
@@ -1544,6 +1544,31 @@ function drush_shell_alias_replace() {
     // Shell alias found for first argument in the request.
     $alias_value = $shell_aliases[$first];
     if (!is_array($alias_value)) {
+      // Shell aliases can have embedded variables such as {{@target}} and {{%root}}
+      // that are replaced with the name of the target site alias, or the value of a
+      // path alias defined in the target site alias record.  We only support replacements
+      // when the alias value is a string; if it is already broken out into an array,
+      // then the values therein are used literally.
+      $alias_variables = array( '{{@target}}' => '@none' );
+      $target_site_alias = drush_get_context('DRUSH_TARGET_SITE_ALIAS', FALSE);
+      if ($target_site_alias) {
+        $alias_variables = array( '{{@target}}' => $target_site_alias );
+        $target = drush_sitealias_get_record($target_site_alias);
+        foreach ($target as $key => $value) {
+          if (!is_array($value)) {
+            $alias_variables['{{' . $key . '}}'] = $value;
+          }
+        }
+        if (array_key_exists('path-aliases', $target)) {
+          foreach ($target['path-aliases'] as $key => $value) {
+            // n.b. $key will contain something like "%root" or "%files".
+            $alias_variables['{{' . $key . '}}'] = $value;
+          }
+        }
+      }
+      $alias_value = str_replace(array_keys($alias_variables), array_values($alias_variables), $alias_value);
+      // Get rid of any unmatched replacements
+      $alias_value = preg_replace('/{{[%@#]*[a-z0-9.]*}}/i', '', $alias_value);
       $alias_value = explode(' ', $alias_value);
     }
     drush_log(dt('Shell alias found: !key => !value', array('!key' => $first, '!value' => implode(' ', $alias_value))), 'debug');
diff --git a/includes/exec.inc b/includes/exec.inc
index c2f17eb..7021aa7 100644
--- a/includes/exec.inc
+++ b/includes/exec.inc
@@ -205,7 +205,6 @@ function drush_shell_proc_build($site, $command = '', $cd = NULL) {
 function drush_shell_proc_open($cmd) {
   if (drush_get_context('DRUSH_VERBOSE') || drush_get_context('DRUSH_SIMULATE')) {
     drush_print("Calling proc_open($cmd);");
-    return 0;
   }
   if (!drush_get_context('DRUSH_SIMULATE')) {
     $process = proc_open($cmd, array(0 => STDIN, 1 => STDOUT, 2 => STDERR), $pipes);
@@ -213,6 +212,7 @@ function drush_shell_proc_open($cmd) {
     $exit_code = proc_close($process);
     return ($proc_status["running"] ? $exit_code : $proc_status["exitcode"] );
   }
+  return 0;
 }
 
 /**
diff --git a/includes/sitealias.inc b/includes/sitealias.inc
index 63fb9a0..503b8f6 100644
--- a/includes/sitealias.inc
+++ b/includes/sitealias.inc
@@ -741,9 +741,9 @@ function drush_sitealias_cache_db_settings(&$alias_record, $databases) {
  * Check to see if we have already bootstrapped to a site.
  */
 function drush_sitealias_is_bootstrapped_site($alias_record) {
-  if (!isset($alias_record['remote-host'])) {
+  if (!isset($alias_record['remote-host']) && array_key_exists('root', $alias_record)) {
     $self_record = drush_sitealias_get_record("@self");
-    if (empty($self_record)) {
+    if (empty($self_record) || !array_key_exists('root', $self_record)) {
       // TODO:  If we have not bootstrapped to a site yet, we could
       // perhaps bootstrap to $alias_record here.
       return FALSE;
