comparison lisp/eshell/esh-ext.el @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 10b09165e86f
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
1 ;;; esh-ext.el --- commands external to Eshell 1 ;;; esh-ext.el --- commands external to Eshell
2 2
3 ;; Copyright (C) 1999, 2000 Free Software Foundation 3 ;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
4 ;; 2005 Free Software Foundation, Inc.
4 5
5 ;; Author: John Wiegley <johnw@gnu.org> 6 ;; Author: John Wiegley <johnw@gnu.org>
6 7
7 ;; This file is part of GNU Emacs. 8 ;; This file is part of GNU Emacs.
8 9
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details. 18 ;; GNU General Public License for more details.
18 19
19 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02111-1307, USA. 23 ;; Boston, MA 02110-1301, USA.
23 24
24 (provide 'esh-ext) 25 (provide 'esh-ext)
25 26
26 (eval-when-compile (require 'esh-maint)) 27 (eval-when-compile (require 'esh-maint))
27 (require 'esh-util) 28 (require 'esh-util)
89 (defcustom eshell-windows-shell-file 90 (defcustom eshell-windows-shell-file
90 (if (eshell-under-windows-p) 91 (if (eshell-under-windows-p)
91 (if (string-match "\\(\\`cmdproxy\\|sh\\)\\.\\(com\\|exe\\)" 92 (if (string-match "\\(\\`cmdproxy\\|sh\\)\\.\\(com\\|exe\\)"
92 shell-file-name) 93 shell-file-name)
93 (or (eshell-search-path "cmd.exe") 94 (or (eshell-search-path "cmd.exe")
94 (eshell-search-path "command.exe")) 95 (eshell-search-path "command.com"))
95 shell-file-name)) 96 shell-file-name))
96 "*The name of the shell command to use for DOS/Windows batch files. 97 "*The name of the shell command to use for DOS/Windows batch files.
97 This defaults to nil on non-Windows systems, where this variable is 98 This defaults to nil on non-Windows systems, where this variable is
98 wholly ignored." 99 wholly ignored."
99 :type '(choice file (const nil)) 100 :type '(choice file (const nil))
101 102
102 (defsubst eshell-invoke-batch-file (&rest args) 103 (defsubst eshell-invoke-batch-file (&rest args)
103 "Invoke a .BAT or .CMD file on DOS/Windows systems." 104 "Invoke a .BAT or .CMD file on DOS/Windows systems."
104 ;; since CMD.EXE can't handle forward slashes in the initial 105 ;; since CMD.EXE can't handle forward slashes in the initial
105 ;; argument... 106 ;; argument...
106 (setcar args (subst-char-in-string directory-sep-char ?\\ (car args))) 107 (setcar args (subst-char-in-string ?/ ?\\ (car args)))
107 (throw 'eshell-replace-command 108 (throw 'eshell-replace-command
108 (eshell-parse-command eshell-windows-shell-file (cons "/c" args)))) 109 (eshell-parse-command eshell-windows-shell-file (cons "/c" args))))
109 110
110 (defcustom eshell-interpreter-alist 111 (defcustom eshell-interpreter-alist
111 (if (eshell-under-windows-p) 112 (if (eshell-under-windows-p)
148 :type 'integer 149 :type 'integer
149 :group 'eshell-ext) 150 :group 'eshell-ext)
150 151
151 (defcustom eshell-explicit-command-char ?* 152 (defcustom eshell-explicit-command-char ?*
152 "*If this char occurs before a command name, call it externally. 153 "*If this char occurs before a command name, call it externally.
153 That is, although vi may be an alias, *vi will always call the 154 That is, although `vi' may be an alias, `\vi' will always call the
154 external version. UNIX users may prefer this variable to be \." 155 external version."
155 :type 'character 156 :type 'character
156 :group 'eshell-ext) 157 :group 'eshell-ext)
157 158
158 ;;; Functions: 159 ;;; Functions:
159 160
314 (cdr interp))))) 315 (cdr interp)))))
315 (or interp (list fullname))))))) 316 (or interp (list fullname)))))))
316 317
317 ;;; Code: 318 ;;; Code:
318 319
320 ;;; arch-tag: 178d4064-7e60-4745-b81f-bab5d8d7c40f
319 ;;; esh-ext.el ends here 321 ;;; esh-ext.el ends here