310 |
(setq shell-mode-map (nconc (make-sparse-keymap) comint-mode-map)) |
(setq shell-mode-map (nconc (make-sparse-keymap) comint-mode-map)) |
311 |
(define-key shell-mode-map "\C-c\C-f" 'shell-forward-command) |
(define-key shell-mode-map "\C-c\C-f" 'shell-forward-command) |
312 |
(define-key shell-mode-map "\C-c\C-b" 'shell-backward-command) |
(define-key shell-mode-map "\C-c\C-b" 'shell-backward-command) |
313 |
(define-key shell-mode-map "\t" 'comint-dynamic-complete) |
(define-key shell-mode-map "\t" 'shell-pcomplete) |
314 |
|
(define-key shell-mode-map "\M-\t" 'shell-pcomplete-reverse) |
315 |
(define-key shell-mode-map "\M-?" |
(define-key shell-mode-map "\M-?" |
316 |
'comint-dynamic-list-filename-completions) |
'comint-dynamic-list-filename-completions) |
317 |
(define-key shell-mode-map [menu-bar completion] |
(define-key shell-mode-map [menu-bar completion] |
397 |
(setq comint-delimiter-argument-list shell-delimiter-argument-list) |
(setq comint-delimiter-argument-list shell-delimiter-argument-list) |
398 |
(setq comint-file-name-chars shell-file-name-chars) |
(setq comint-file-name-chars shell-file-name-chars) |
399 |
(setq comint-file-name-quote-list shell-file-name-quote-list) |
(setq comint-file-name-quote-list shell-file-name-quote-list) |
|
(setq comint-dynamic-complete-functions shell-dynamic-complete-functions) |
|
400 |
(make-local-variable 'paragraph-start) |
(make-local-variable 'paragraph-start) |
401 |
(setq paragraph-start comint-prompt-regexp) |
(setq paragraph-start comint-prompt-regexp) |
402 |
(make-local-variable 'font-lock-defaults) |
(make-local-variable 'font-lock-defaults) |
857 |
(progn (goto-char (match-beginning 1)) |
(progn (goto-char (match-beginning 1)) |
858 |
(skip-chars-forward ";&|"))))) |
(skip-chars-forward ";&|"))))) |
859 |
|
|
860 |
|
(defun shell-pcomplete () |
861 |
|
"Cycle forwards through completions at point, using `pcomplete'. |
862 |
|
This function merely invokes `pcomplete', after ensuring this buffer |
863 |
|
is set up for it." |
864 |
|
(interactive) |
865 |
|
(unless (prog1 shell-pcomplete-setup-p |
866 |
|
(setq shell-pcomplete-setup-p t)) |
867 |
|
(pcomplete-comint-setup 'shell-dynamic-complete-functions)) |
868 |
|
;; Convince pcomplete we are calling it directly |
869 |
|
(setq this-command 'pcomplete) |
870 |
|
(call-interactively #'pcomplete)) |
871 |
|
|
872 |
|
(defun shell-pcomplete-reverse () |
873 |
|
"Cycle backwards through completions at point, using `pcomplete'. |
874 |
|
This function merely invokes `pcomplete-reverse', after ensuring this |
875 |
|
buffer is set up for it." |
876 |
|
(interactive) |
877 |
|
(unless (prog1 shell-pcomplete-setup-p |
878 |
|
(setq shell-pcomplete-setup-p t)) |
879 |
|
(pcomplete-comint-setup 'shell-dynamic-complete-functions)) |
880 |
|
;; Convince pcomplete we are calling it directly |
881 |
|
(setq this-command 'pcomplete-reverse) |
882 |
|
(call-interactively #'pcomplete-reverse)) |
883 |
|
|
884 |
(defun shell-dynamic-complete-command () |
(defun shell-dynamic-complete-command () |
885 |
"Dynamically complete the command at point. |
"Dynamically complete the command at point. |