function drush_escapeshellarg

8.0.x exec.inc drush_escapeshellarg($arg, $os = NULL, $raw = FALSE)
6.x exec.inc drush_escapeshellarg($arg, $os = NULL)
7.x exec.inc drush_escapeshellarg($arg, $os = NULL, $raw = FALSE)
4.x drush.inc drush_escapeshellarg($arg)
5.x exec.inc drush_escapeshellarg($arg, $os = NULL)
master startup.inc drush_escapeshellarg($arg, $os = NULL, $raw = FALSE)

Platform-independent version of escapeshellarg(). This only works for local commands. TODO: Make a unified drush_escapeshellarg that works on Linux and Windows.

Related topics

5 calls to drush_escapeshellarg()
package_handler_download_project in commands/pm/package_handler/git_drupalorg.inc
Download a project.
_drush_backend_generate_command_sitealias in includes/backend.inc
Generate a command to execute.
_drush_shell_exec in includes/drush.inc
Internal function: executes a shell command on the local machine. This function should not be used in instances where ssh is utilized to execute a command remotely; otherwise, remote operations would fail if executed from a Windows machine to a…
_drush_sql_get_credentials in commands/sql/sql.drush.inc
Build a fragment containing credentials and mysql-connection parameters.
_drush_sql_query in commands/sql/sql.drush.inc

File

includes/drush.inc, line 1383
The drush API implementation and helpers.

Code

function drush_escapeshellarg($arg) {
  if (drush_is_windows()) {
    return _drush_escapeshellarg_windows($arg);
  }
  else {
    return escapeshellarg($arg);
  }
}