Mercurial > emacs
comparison lisp/eshell/esh-ext.el @ 37818:225c25d9631c
(eshell-explicit-command-char): A new configuration variable, which
determines the initial character that forces use of an external
version of a command. The default is *, but may be set to \, for
example.
(eshell-explicit-command): Use `eshell-explicit-command-char' instead
of ?*.
author | John Wiegley <johnw@newartisans.com> |
---|---|
date | Fri, 18 May 2001 16:40:11 +0000 |
parents | 6d7c89c79996 |
children | 67b464da13ec |
comparison
equal
deleted
inserted
replaced
37817:431f430082e9 | 37818:225c25d9631c |
---|---|
148 (defcustom eshell-command-interpreter-max-length 256 | 148 (defcustom eshell-command-interpreter-max-length 256 |
149 "*The maximum length of any command interpreter string, plus args." | 149 "*The maximum length of any command interpreter string, plus args." |
150 :type 'integer | 150 :type 'integer |
151 :group 'eshell-ext) | 151 :group 'eshell-ext) |
152 | 152 |
153 (defcustom eshell-explicit-command-char ?* | |
154 "*If this char occurs before a command name, call it externally. | |
155 That is, although vi may be an alias, *vi will always call the | |
156 external version. UNIX users may prefer this variable to be \." | |
157 :type 'character | |
158 :group 'eshell-ext) | |
159 | |
153 ;;; Functions: | 160 ;;; Functions: |
154 | 161 |
155 (defun eshell-ext-initialize () | 162 (defun eshell-ext-initialize () |
156 "Initialize the external command handling code." | 163 "Initialize the external command handling code." |
157 (make-local-hook 'eshell-named-command-hook) | 164 (make-local-hook 'eshell-named-command-hook) |
159 | 166 |
160 (defun eshell-explicit-command (command args) | 167 (defun eshell-explicit-command (command args) |
161 "If a command name begins with `*', call it externally always. | 168 "If a command name begins with `*', call it externally always. |
162 This bypasses all Lisp functions and aliases." | 169 This bypasses all Lisp functions and aliases." |
163 (when (and (> (length command) 1) | 170 (when (and (> (length command) 1) |
164 (eq (aref command 0) ?*)) | 171 (eq (aref command 0) eshell-explicit-command-char)) |
165 (let ((cmd (eshell-search-path (substring command 1)))) | 172 (let ((cmd (eshell-search-path (substring command 1)))) |
166 (if cmd | 173 (if cmd |
167 (or (eshell-external-command cmd args) | 174 (or (eshell-external-command cmd args) |
168 (error "%s: external command failed" cmd)) | 175 (error "%s: external command failed" cmd)) |
169 (error "%s: external command not found" | 176 (error "%s: external command not found" |