Functions to execute commands.

  1. 6.x drush/includes/ commandwrappers
  2. 4.x drush/includes/ commandwrappers
  3. 5.x drush/includes/ commandwrappers
  4. 7.x drush/includes/ commandwrappers


Namesort descending Location Description
drush_escapeshellarg drush/includes/ Platform-dependent version of escapeshellarg(). Given the target platform, return an appropriately-escaped string. The target platform may be omitted for args that are /known/ to be for the local machine.
drush_get_editor drush/includes/ Returns executable code for invoking preferred test editor.
drush_op_system drush/includes/ Calls 'system()' function, passing through all arguments unchanged.
drush_os drush/includes/ Determine the appropriate os value for the specified site record
drush_remote_host drush/includes/ Determine the remote host (username@hostname.tld) for the specified site.
drush_shell_cd_and_exec drush/includes/ Executes a shell command at a new working directory. The old cwd is restored on exit.
drush_shell_exec drush/includes/ Executes a shell command. Output is only printed if in verbose mode. Output is stored and can be retrieved using drush_shell_exec_output(). If in simulation mode, no action is taken.
drush_shell_exec_interactive drush/includes/ Executes a command in interactive mode.
drush_shell_exec_output drush/includes/ Returns the output of the most recent shell command as an array of lines.
drush_shell_exec_proc_build_options drush/includes/ Used by definition of ssh and other commands that call into drush_shell_proc_build() to declare their options.
drush_shell_proc_build drush/includes/ Build an SSH string including an optional fragment of bash. Commands that use this should also merge drush_shell_proc_build_options() into their command options.
drush_shell_proc_open drush/includes/ Execute bash command using proc_open().
drush_start_browser drush/includes/ Starts a background browser/tab for the current site or a specified URL.
drush_wrap_with_quotes drush/includes/ Make an attempt to simply wrap the arg with the kind of quote characters it does not already contain. If it contains both kinds, then this function reverts to drush_escapeshellarg.
_drush_escapeshellarg_linux drush/includes/ Linux version of escapeshellarg().
_drush_escapeshellarg_windows drush/includes/ Windows version of escapeshellarg().
_drush_shell_exec drush/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_shell_exec_output_set drush/includes/ Stores output for the most recent shell command. This should only be run from drush_shell_exec().


drush/includes/, line 8
Functions for executing system commands. (e.g. exec(), system(), ...).