comparison lisp/shell.el @ 69758:2b93f40e4545

(shell-directory-tracker, shell-dynamic-complete-command): Doc fixes.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 01 Apr 2006 21:14:41 +0000
parents 3bd95f4f2941
children a69f2db3d3ae 482dfed28bee
comparison
equal deleted inserted replaced
69757:fc5d7c91100d 69758:2b93f40e4545
572 ;;; the version in Emacs 18's shell.el. It has the following failings: 572 ;;; the version in Emacs 18's shell.el. It has the following failings:
573 ;;; 1. It doesn't know about the cdpath shell variable. 573 ;;; 1. It doesn't know about the cdpath shell variable.
574 ;;; 2. It cannot infallibly deal with command sequences, though it does well 574 ;;; 2. It cannot infallibly deal with command sequences, though it does well
575 ;;; with these and with ignoring commands forked in another shell with ()s. 575 ;;; with these and with ignoring commands forked in another shell with ()s.
576 ;;; 3. More generally, any complex command is going to throw it. Otherwise, 576 ;;; 3. More generally, any complex command is going to throw it. Otherwise,
577 ;;; you'd have to build an entire shell interpreter in emacs lisp. Failing 577 ;;; you'd have to build an entire shell interpreter in Emacs Lisp. Failing
578 ;;; that, there's no way to catch shell commands where cd's are buried 578 ;;; that, there's no way to catch shell commands where cd's are buried
579 ;;; inside conditional expressions, aliases, and so forth. 579 ;;; inside conditional expressions, aliases, and so forth.
580 ;;; 580 ;;;
581 ;;; The whole approach is a crock. Shell aliases mess it up. File sourcing 581 ;;; The whole approach is a crock. Shell aliases mess it up. File sourcing
582 ;;; messes it up. You run other processes under the shell; these each have 582 ;;; messes it up. You run other processes under the shell; these each have
606 This function is called on each input passed to the shell. 606 This function is called on each input passed to the shell.
607 It watches for cd, pushd and popd commands and sets the buffer's 607 It watches for cd, pushd and popd commands and sets the buffer's
608 default directory to track these commands. 608 default directory to track these commands.
609 609
610 You may toggle this tracking on and off with M-x dirtrack-mode. 610 You may toggle this tracking on and off with M-x dirtrack-mode.
611 If emacs gets confused, you can resync with the shell with M-x dirs. 611 If Emacs gets confused, you can resync with the shell with M-x dirs.
612 612
613 See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp', 613 See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp',
614 and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', 614 and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract',
615 and `shell-pushd-dunique' control the behavior of the relevant command. 615 and `shell-pushd-dunique' control the behavior of the relevant command.
616 616
927 (skip-chars-forward ";&|"))))) 927 (skip-chars-forward ";&|")))))
928 928
929 (defun shell-dynamic-complete-command () 929 (defun shell-dynamic-complete-command ()
930 "Dynamically complete the command at point. 930 "Dynamically complete the command at point.
931 This function is similar to `comint-dynamic-complete-filename', except that it 931 This function is similar to `comint-dynamic-complete-filename', except that it
932 searches `exec-path' (minus the trailing emacs library path) for completion 932 searches `exec-path' (minus the trailing Emacs library path) for completion
933 candidates. Note that this may not be the same as the shell's idea of the 933 candidates. Note that this may not be the same as the shell's idea of the
934 path. 934 path.
935 935
936 Completion is dependent on the value of `shell-completion-execonly', plus 936 Completion is dependent on the value of `shell-completion-execonly', plus
937 those that effect file completion. See `shell-dynamic-complete-as-command'. 937 those that effect file completion. See `shell-dynamic-complete-as-command'.