File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 2929
3030(defun drupal/pcomplete-drush-commands ()
3131 " Return the most common drush commands by parsing the drush output."
32- (with-temp-buffer
33- (call-process drupal-drush-program nil t nil
34- " --early=includes/complete.inc" )
35- (goto-char 0 )
36- (let (commands)
37- (while (re-search-forward
38- " ^[[:blank:]]*\\ ([@]?[[:word:]-.]+\\ )"
39- nil t )
40- (push (match-string-no-properties 1 ) commands))
41- (sort commands #'string< ))))
32+ (when drupal-drush-program
33+ (with-temp-buffer
34+ (call-process drupal-drush-program nil t nil
35+ " --early=includes/complete.inc" )
36+ (goto-char 0 )
37+ (let (commands)
38+ (while (re-search-forward
39+ " ^[[:blank:]]*\\ ([@]?[[:word:]-.]+\\ )"
40+ nil t )
41+ (push (match-string-no-properties 1 ) commands))
42+ (sort commands #'string< )))))
4243
4344(defvar drupal/pcomplete-drush-commands (drupal/pcomplete-drush-commands)
4445 " List of `drush' commands." )
You can’t perform that action at this time.
0 commit comments