;;; em-alias.el --- creation and management of command aliases
-;; 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>
;; :link '(info-link "(eshell)Command aliases")
:group 'eshell-module)
-(defcustom eshell-aliases-file (concat eshell-directory-name "alias")
- "*The file in which aliases are kept.
+(defcustom eshell-aliases-file (expand-file-name "alias" eshell-directory-name)
+ "The file in which aliases are kept.
Whenever an alias is defined by the user, using the `alias' command,
it will be written to this file. Thus, alias definitions (and
deletions) are always permanent. This approach was chosen for the
:group 'eshell-alias)
(defcustom eshell-bad-command-tolerance 3
- "*The number of failed commands to ignore before creating an alias."
+ "The number of failed commands to ignore before creating an alias."
:type 'integer
;; :link '(custom-manual "(eshell)Auto-correction of bad commands")
:group 'eshell-alias)
-(defcustom eshell-alias-load-hook '(eshell-alias-initialize)
- "*A hook that gets run when `eshell-alias' is loaded."
+(defcustom eshell-alias-load-hook nil
+ "A hook that gets run when `eshell-alias' is loaded."
+ :version "24.1" ; removed eshell-alias-initialize
:type 'hook
:group 'eshell-alias)
(defun eshell/alias (&optional alias &rest definition)
"Define an ALIAS in the user's alias list using DEFINITION."
(if (not alias)
- (eshell-for alias eshell-command-aliases-list
+ (dolist (alias eshell-command-aliases-list)
(eshell-print (apply 'format "alias %s %s\n" alias)))
(if (not definition)
(setq eshell-command-aliases-list
"Find all possible completions for NAME.
These are all the command aliases which begin with NAME."
(let (completions)
- (eshell-for alias eshell-command-aliases-list
+ (dolist (alias eshell-command-aliases-list)
(if (string-match (concat "^" name) (car alias))
(setq completions (cons (car alias) completions))))
completions))
;; generated-autoload-file: "esh-groups.el"
;; End:
-;; arch-tag: 8b018fc1-4e07-4ccc-aa73-c0a1ba361f82
;;; em-alias.el ends here