[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EShell bug?
From: |
Emilio Lopes |
Subject: |
EShell bug? |
Date: |
22 Jun 2003 19:08:00 +0200 |
User-agent: |
Emacs Gnus |
[ I've already tried to poste this twice, but it doesn't
seem it ever left the local news server. So my apologies
if you see this posting twice. ]
GNU Emacs 21.3.1 (i386-msvc-nt4.0.1381) of 2003-03-28 on buffy
I've got EShell to directly execute Perl scripts on a Windows system
by using
(add-to-list 'eshell-interpreter-alist '("\\.pl\\'" . eshell-invoke-perl)))
where the function `eshell-invoke-perl' simply calls the perl
interpreter with the script as argument:
(defsubst eshell-invoke-perl (&rest args)
"*Invoke Perl to run a Perl-Script."
(throw 'eshell-replace-command
(eshell-parse-command (eshell-search-path "perl") (cons "-S"
args))))
It does work:
e:/ecl $ hello.pl
Hello World!
Nevertheless `which' can't identify "hello.pl" as a command:
e:/ecl $ which hello
which: no hello in (...)
e:/ecl $ which hello.pl
which: no hello.pl in (...)
Further, I would like to be able to type only "hello" to get my script
executed. This "trick" already works out of the box for DOS batch
files.
So I do
(add-to-list 'eshell-binary-suffixes ".pl")
And since my Perl scripts don't have executable permissions I also set
(setq eshell-force-execution t)
Indeed `which' seems to identify the script as executable now:
e:/ecl $ which hello
e:/batch/hello.pl
e:/ecl $ which hello.pl
e:/batch/hello.pl
But when I try to execute it I get:
e:/ecl $ hello
e:/batch/hello.pl: not an executable file
This looks like a bug to me. Am I missing something here?
Emilio
--
Emilio C. Lopes <mailto:eclig(usenet-20030622)@gmx.net>
München <48°8'N, 11°34'E>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- EShell bug?,
Emilio Lopes <=