Functions to execute commands.

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

Functions

Namesort descending Location Description
drush_escapeshellarg drush/includes/exec.inc 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/exec.inc Returns executable code for invoking preferred test editor.
drush_op_system drush/includes/exec.inc Calls 'system()' function, passing through all arguments unchanged.
drush_os drush/includes/exec.inc Determine the appropriate os value for the specified site record
drush_remote_host drush/includes/exec.inc Determine the remote host (username@hostname.tld) for the specified site.
drush_shell_cd_and_exec drush/includes/exec.inc Executes a shell command at a new working directory. The old cwd is restored on exit.
drush_shell_exec drush/includes/exec.inc 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/exec.inc Executes a command in interactive mode.
drush_shell_exec_output drush/includes/exec.inc Returns the output of the most recent shell command as an array of lines.
drush_shell_exec_proc_build_options drush/includes/exec.inc 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/exec.inc 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/exec.inc Execute bash command using proc_open().
drush_start_browser drush/includes/exec.inc Starts a background browser/tab for the current site or a specified URL.
drush_wrap_with_quotes drush/includes/exec.inc 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/exec.inc Linux version of escapeshellarg().
_drush_escapeshellarg_windows drush/includes/exec.inc Windows version of escapeshellarg().
_drush_shell_exec drush/includes/exec.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_shell_exec_output_set drush/includes/exec.inc Stores output for the most recent shell command. This should only be run from drush_shell_exec().

File

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