;;; em-cmpl.el --- completion using the TAB key
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
(eval-when-compile
+ (require 'cl)
(require 'eshell))
(require 'esh-util)
-(defgroup eshell-cmpl nil
+;;;###autoload
+(eshell-defgroup eshell-cmpl nil
"This module provides a programmable completion function bound to
the TAB key, which allows for completing command names, file names,
variable names, arguments, etc."
;;; User Variables:
(defcustom eshell-cmpl-load-hook '(eshell-cmpl-initialize)
- "*A list of functions to run when `eshell-cmpl' is loaded."
+ "A list of functions to run when `eshell-cmpl' is loaded."
:type 'hook
:group 'eshell-cmpl)
(defcustom eshell-show-lisp-completions nil
- "*If non-nil, include Lisp functions in the command completion list.
+ "If non-nil, include Lisp functions in the command completion list.
If this variable is nil, Lisp completion can still be done in command
position by using M-TAB instead of TAB."
:type 'boolean
:group 'eshell-cmpl)
(defcustom eshell-show-lisp-alternatives t
- "*If non-nil, and no other completions found, show Lisp functions.
+ "If non-nil, and no other completions found, show Lisp functions.
Setting this variable means nothing if `eshell-show-lisp-completions'
is non-nil."
:type 'boolean
:group 'eshell-cmpl)
(defcustom eshell-no-completion-during-jobs t
- "*If non-nil, don't allow completion while a process is running."
+ "If non-nil, don't allow completion while a process is running."
:type 'boolean
:group 'eshell-cmpl)
("dbx" . "\\`\\([^.]*\\|a\\.out\\)\\'")
("sdb" . "\\`\\([^.]*\\|a\\.out\\)\\'")
("adb" . "\\`\\([^.]*\\|a\\.out\\)\\'"))
- "*An alist that defines simple argument type correlations.
+ "An alist that defines simple argument type correlations.
This is provided for common commands, as a simplistic alternative
to writing a completion function."
:type '(repeat (cons string regexp))
(setq filename (substring filename 1)
pcomplete-stub filename
glob-name t))
- (let* ((paths (split-string (getenv "PATH") path-separator))
+ (let* ((paths (eshell-parse-colon-path eshell-path-env))
(cwd (file-name-as-directory
(expand-file-name default-directory)))
(path "") (comps-in-path ())
(provide 'em-cmpl)
-;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc
+;; Local Variables:
+;; generated-autoload-file: "esh-groups.el"
+;; End:
+
;;; em-cmpl.el ends here