function drush_get_editor

8.0.x exec.inc drush_get_editor()
6.x exec.inc drush_get_editor()
7.x exec.inc drush_get_editor()
5.x exec.inc drush_get_editor()
master exec.inc drush_get_editor()

Returns executable code for invoking preferred test editor.

The next line after calling this function is usually

drush_shell_exec_interactive($exec, $filepath, $filepath) 

See also

drush_config_edit()

Related topics

3 calls to drush_get_editor()
drush_config_edit in commands/core/config.drush.inc
Edit command callback.
drush_core_config in commands/core/core.drush.inc
Command callback. Edit drushrc and alias files.
drush_init_core_init in commands/core/init.drush.inc
Initialize local Drush configuration

File

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

Code

function drush_get_editor() {
  $bg = drush_get_option('bg') ? '&' : '';
  // see http://drupal.org/node/1740294
  $exec = drush_get_option('editor', '${VISUAL-${EDITOR-vi}}') . " %s $bg";
  return $exec;
}