function drush_escapeshellarg

8.0.x drush_escapeshellarg($arg, $os = NULL, $raw = FALSE)
6.x drush_escapeshellarg($arg, $os = NULL)
7.x drush_escapeshellarg($arg, $os = NULL, $raw = FALSE)
4.x drush_escapeshellarg($arg)
5.x drush_escapeshellarg($arg, $os = NULL)
master 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/
Download a project.
_drush_backend_generate_command_sitealias in includes/
Generate a command to execute.
_drush_shell_exec in includes/
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/
Build a fragment containing credentials and mysql-connection parameters.
_drush_sql_query in commands/sql/


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


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