diff options
| author | Stefan Monnier | 2018-12-04 12:39:47 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2018-12-04 12:39:47 -0500 |
| commit | eaeeece92da51b517097667f13d580aa92ad5d59 (patch) | |
| tree | 12d633ca416055fe94706298a92f889b49dfb6b2 /lisp/shell.el | |
| parent | f745cf8c438cdb258bc1a37b617749d1c84e688e (diff) | |
| download | emacs-eaeeece92da51b517097667f13d580aa92ad5d59.tar.gz emacs-eaeeece92da51b517097667f13d580aa92ad5d59.zip | |
* lisp/shell.el (shell--parse-pcomplete-arguments): Stop at semi-colon
* test/lisp/shell-tests.el (shell-tests-completion-before-semi):
New corresponding test.
Diffstat (limited to 'lisp/shell.el')
| -rw-r--r-- | lisp/shell.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index ac6f11aeb40..16aeffc1b61 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -426,7 +426,7 @@ Thus, this does not include the shell's current directory.") | |||
| 426 | (while (looking-at | 426 | (while (looking-at |
| 427 | (eval-when-compile | 427 | (eval-when-compile |
| 428 | (concat | 428 | (concat |
| 429 | "\\(?:[^\s\t\n\\\"']+" | 429 | "\\(?:[^\s\t\n\\\"';]+" |
| 430 | "\\|'\\([^']*\\)'?" | 430 | "\\|'\\([^']*\\)'?" |
| 431 | "\\|\"\\(\\(?:[^\"\\]\\|\\\\.\\)*\\)\"?" | 431 | "\\|\"\\(\\(?:[^\"\\]\\|\\\\.\\)*\\)\"?" |
| 432 | "\\|\\\\\\(\\(?:.\\|\n\\)?\\)\\)"))) | 432 | "\\|\\\\\\(\\(?:.\\|\n\\)?\\)\\)"))) |
| @@ -490,7 +490,7 @@ Shell buffers. It implements `shell-completion-execonly' for | |||
| 490 | (setq comint-input-autoexpand shell-input-autoexpand) | 490 | (setq comint-input-autoexpand shell-input-autoexpand) |
| 491 | ;; Not needed in shell-mode because it's inherited from comint-mode, but | 491 | ;; Not needed in shell-mode because it's inherited from comint-mode, but |
| 492 | ;; placed here for read-shell-command. | 492 | ;; placed here for read-shell-command. |
| 493 | (add-hook 'completion-at-point-functions 'comint-completion-at-point nil t)) | 493 | (add-hook 'completion-at-point-functions #'comint-completion-at-point nil t)) |
| 494 | 494 | ||
| 495 | (put 'shell-mode 'mode-class 'special) | 495 | (put 'shell-mode 'mode-class 'special) |
| 496 | 496 | ||
| @@ -606,7 +606,7 @@ buffer." | |||
| 606 | ;; Bypass a bug in certain versions of bash. | 606 | ;; Bypass a bug in certain versions of bash. |
| 607 | (when (string-equal shell "bash") | 607 | (when (string-equal shell "bash") |
| 608 | (add-hook 'comint-preoutput-filter-functions | 608 | (add-hook 'comint-preoutput-filter-functions |
| 609 | 'shell-filter-ctrl-a-ctrl-b nil t))) | 609 | #'shell-filter-ctrl-a-ctrl-b nil t))) |
| 610 | (comint-read-input-ring t))) | 610 | (comint-read-input-ring t))) |
| 611 | 611 | ||
| 612 | (defun shell-apply-ansi-color (beg end face) | 612 | (defun shell-apply-ansi-color (beg end face) |
| @@ -751,7 +751,7 @@ Otherwise, one argument `-i' is passed to the shell. | |||
| 751 | (xargs-name (intern-soft (concat "explicit-" name "-args")))) | 751 | (xargs-name (intern-soft (concat "explicit-" name "-args")))) |
| 752 | (unless (file-exists-p startfile) | 752 | (unless (file-exists-p startfile) |
| 753 | (setq startfile (concat user-emacs-directory "init_" name ".sh"))) | 753 | (setq startfile (concat user-emacs-directory "init_" name ".sh"))) |
| 754 | (apply 'make-comint-in-buffer "shell" buffer prog | 754 | (apply #'make-comint-in-buffer "shell" buffer prog |
| 755 | (if (file-exists-p startfile) startfile) | 755 | (if (file-exists-p startfile) startfile) |
| 756 | (if (and xargs-name (boundp xargs-name)) | 756 | (if (and xargs-name (boundp xargs-name)) |
| 757 | (symbol-value xargs-name) | 757 | (symbol-value xargs-name) |
| @@ -973,10 +973,10 @@ this feature; see the function `dirtrack-mode'." | |||
| 973 | nil nil nil | 973 | nil nil nil |
| 974 | (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) | 974 | (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) |
| 975 | (if shell-dirtrack-mode | 975 | (if shell-dirtrack-mode |
| 976 | (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t) | 976 | (add-hook 'comint-input-filter-functions #'shell-directory-tracker nil t) |
| 977 | (remove-hook 'comint-input-filter-functions 'shell-directory-tracker t))) | 977 | (remove-hook 'comint-input-filter-functions #'shell-directory-tracker t))) |
| 978 | 978 | ||
| 979 | (define-obsolete-function-alias 'shell-dirtrack-toggle 'shell-dirtrack-mode | 979 | (define-obsolete-function-alias 'shell-dirtrack-toggle #'shell-dirtrack-mode |
| 980 | "23.1") | 980 | "23.1") |
| 981 | 981 | ||
| 982 | (defun shell-cd (dir) | 982 | (defun shell-cd (dir) |