all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Inject some eshell features into shell?
@ 2003-10-15 19:36 Kai Grossjohann
  2003-10-15 21:07 ` Stefan Monnier
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Kai Grossjohann @ 2003-10-15 19:36 UTC (permalink / raw)


Even though I now know how to do for loops in eshell, I was wondering
if the following idea might be fun to play with.  Maybe someone has
already done this and would like to share?

I find that the feature I use most in eshell is the fact that I can
type "vi foo.c" to edit that file in Emacs, as if I had typed C-x C-f
foo.c.  (This does suffer from the bad effect that I'm somehow
conditioned to do file editing differently if I have started it with
vi, so suddenly I'm seeing a lot of hjkl and ZZ in my files ;-)  It
is, however, a perfect companion to Viper.  I never could get used to
typing "find-file foo.c".)

So maybe it would be nifty if one could somehow hook a function into
the RET key in shell-mode that looks if it recognizes the command on
the current line.  If so, it invokes a given Lisp function, depending
on the command.  That way, I could get the "vi foo.c" back.  Other
candidates would be "man" and "less", I guess.

(Another feature I use a lot is the completion, but I think marrying
pcomplete and shell-mode isn't going to be difficult.)

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Inject some eshell features into shell?
  2003-10-15 19:36 Inject some eshell features into shell? Kai Grossjohann
@ 2003-10-15 21:07 ` Stefan Monnier
  2003-10-17 19:31 ` Kevin Rodgers
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 18+ messages in thread
From: Stefan Monnier @ 2003-10-15 21:07 UTC (permalink / raw)


> foo.c.  (This does suffer from the bad effect that I'm somehow
> conditioned to do file editing differently if I have started it with
> vi, so suddenly I'm seeing a lot of hjkl and ZZ in my files ;-)  It

Try to use `e' instead of `vi': it's shorter, currently unused (most
likely), and has a better mnemonic value for `emacs' or `edit'.


        Stefan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Inject some eshell features into shell?
  2003-10-15 19:36 Inject some eshell features into shell? Kai Grossjohann
  2003-10-15 21:07 ` Stefan Monnier
@ 2003-10-17 19:31 ` Kevin Rodgers
  2003-10-17 22:44   ` Kevin Rodgers
  2003-10-19 12:31 ` Loops and scripting in eshell (was: Inject some eshell features into shell?) Oliver Scholz
  2003-10-22 10:55 ` Inject some eshell features into shell? Matthias Meulien
  3 siblings, 1 reply; 18+ messages in thread
From: Kevin Rodgers @ 2003-10-17 19:31 UTC (permalink / raw)


Kai Grossjohann wrote:

> So maybe it would be nifty if one could somehow hook a function into
> the RET key in shell-mode that looks if it recognizes the command on
> the current line.  If so, it invokes a given Lisp function, depending
> on the command.  That way, I could get the "vi foo.c" back.  Other
> candidates would be "man" and "less", I guess.

Here's a start.  It's main deficiency is that it only works for commands

that take zero or one argument:


(defun shell-maybe-send (process command)
   "Maybe send the shell PROCESS the COMMAND string.
But if COMMAND can be interpreted as an Emacs command (e.g. \"find-file foo.c\"),
evaluate it instead."
   (with-syntax-table emacs-lisp-mode-syntax-table
     (let* ((command-name (and (string-match "\\`\\(\\(\\sw\\|\\s_\\)+\\)\\s *"
                                             command)
                               (match-string 1 command)))
            (command-symbol (and command-name
                                 (intern-soft command-name))))
       (if (and command-symbol (commandp command-symbol))
           (if (= (match-end 0) (length command))
               (funcall command-symbol)
             (funcall command-symbol (substring command (match-end 0))))
         (comint-simple-send process command)))))

(add-hook 'shell-mode-hook
           (lambda () (setq comint-input-sender 'shell-maybe-send)))

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Inject some eshell features into shell?
  2003-10-17 19:31 ` Kevin Rodgers
@ 2003-10-17 22:44   ` Kevin Rodgers
  2003-10-19 10:56     ` Kai Grossjohann
       [not found]     ` <mailman.1974.1066561040.21628.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 18+ messages in thread
From: Kevin Rodgers @ 2003-10-17 22:44 UTC (permalink / raw)


Kevin Rodgers wrote:

> Here's a start.  It's main deficiency is that it only works for commands
> that take zero or one argument:


This should fix that problem:


(defun shell-maybe-send (process command)
  "Maybe send the shell PROCESS the COMMAND string.
But if COMMAND can be interpreted as an Emacs command (e.g. \"find-file foo.c\"),
convert it to Lisp and evaluate it."
  (let* ((command-list (split-string command))
         (command-symbol (and (car command-list)
                              (intern-soft (car command-list)))))
    (if (and command-symbol (commandp command-symbol))
        (apply command-symbol (cdr command-list))
      (comint-simple-send process command))))


(add-hook 'shell-mode-hook
          (lambda () (setq comint-input-sender 'shell-maybe-send)))


-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Inject some eshell features into shell?
  2003-10-17 22:44   ` Kevin Rodgers
@ 2003-10-19 10:56     ` Kai Grossjohann
       [not found]     ` <mailman.1974.1066561040.21628.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 18+ messages in thread
From: Kai Grossjohann @ 2003-10-19 10:56 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Kevin Rodgers wrote:
>
>> Here's a start.  It's main deficiency is that it only works for commands
>> that take zero or one argument:
>
>
> This should fix that problem:

Hey, cool!  It's not quite what I meant, but you're showing me the
interesting bits.  I need to set comint-input-sender to my function,
and my function needs to fall back using comint-simple-send.

What I meant was something less automatic: Have an alist which says
which Lisp to invoke depending on the first word.

But maybe it's also good to use the eshell way of doing things: just
look for a kshell/foo function if the user entered foo.

When using eshell, I noticed that many Lisp functions are not suitable
to be called from the shell prompt.  For example, cvs-update is a good
candiate, but it requires me to pass FLAGS (and DIRECTORY).  It just
fees unnatural to type "cvs-update . nil" at the shell prompt, when
"cvs-update" ought to do.

But let me thank you again for showing me the way to do it.  If I ever
get a round tuit, then of course I'll share my meagre results.

(For maximum bliss, I'll need to work on getting a decent shell under
Windows.)
-- 
Two cafe au lait please, but without milk.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Loops and scripting in eshell (was: Inject some eshell features into shell?)
  2003-10-15 19:36 Inject some eshell features into shell? Kai Grossjohann
  2003-10-15 21:07 ` Stefan Monnier
  2003-10-17 19:31 ` Kevin Rodgers
@ 2003-10-19 12:31 ` Oliver Scholz
  2003-10-19 15:06   ` Loops and scripting in eshell Kai Grossjohann
                     ` (2 more replies)
  2003-10-22 10:55 ` Inject some eshell features into shell? Matthias Meulien
  3 siblings, 3 replies; 18+ messages in thread
From: Oliver Scholz @ 2003-10-19 12:31 UTC (permalink / raw)


Kai Grossjohann <kai.grossjohann@gmx.net> writes:

> Even though I now know how to do for loops in eshell, I was wondering
> if the following idea might be fun to play with.  Maybe someone has
> already done this and would like to share?
[...]

Loops are the one feature that I am missing in eshell. But rather than
adding the features I like to M-x shell, I'd prefer to enhance
eshell. [For purely religious reasons. I am very fond of eshell and,
moreover, I believe that the gods of editing will reward me for using
a shell that is implemented in Elisp.]

I sometimes use something like this:

(loop for f in (directory-files "." nil "\\w") do (rename-file f (concat f "x")))

on the eshell command line.

But for the simple stuff I need, I'd prefer the sh syntax:

for i in `ls` do ...

I know how to write a simple interpreter, but unfortunately I am not
familiar with eshell's internals. And I am actually a dummy as far as
shell scripting is concerned (I tend to use Elisp for
everything). And I don't want to spend much time on it right now.

So my questions are:

1. Is it the Right Way to get this by `defun'ing a function
   `eshell/for' which does the necessary parsing? The backquote stuff
   would probably be a problem, but I am not sure whether eshell
   actually provides a way to deal with it. Maybe I could take care
   of it myself. Thoughts?

2. Where can I get (comprehensive) documentation for the sh (bourne?)
   command syntax? I think, if it is feasible, I could as well make
   it decent enough to be worth a patch sent to the eshell
   maintainer.

    Oliver
-- 
28 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-19 12:31 ` Loops and scripting in eshell (was: Inject some eshell features into shell?) Oliver Scholz
@ 2003-10-19 15:06   ` Kai Grossjohann
       [not found]   ` <mailman.1980.1066576051.21628.help-gnu-emacs@gnu.org>
  2003-10-20 19:48   ` Reiner Steib
  2 siblings, 0 replies; 18+ messages in thread
From: Kai Grossjohann @ 2003-10-19 15:06 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> Kai Grossjohann <kai.grossjohann@gmx.net> writes:
>
>> Even though I now know how to do for loops in eshell, I was wondering
>> if the following idea might be fun to play with.  Maybe someone has
>> already done this and would like to share?
> [...]
>
> Loops are the one feature that I am missing in eshell.

for f in a b { echo $f; }               # invokes shell command echo
for f in a b ( find-file f )            # invokes Lisp command

It's quite cool, actually, though the syntax is not very Bourne-ish.

How to do two Lisp commands?  Hm.  Oh.  Very interesting.  Compare:

for f in a b (progn (message f) (sit-for 1))
for f in a b { (message f); sleep 1 }

It changes the behavior of `message'!
-- 
Two cafe au lait please, but without milk.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
       [not found]   ` <mailman.1980.1066576051.21628.help-gnu-emacs@gnu.org>
@ 2003-10-19 20:04     ` Oliver Scholz
  2003-10-19 20:15       ` Oliver Scholz
  0 siblings, 1 reply; 18+ messages in thread
From: Oliver Scholz @ 2003-10-19 20:04 UTC (permalink / raw)


Kai Grossjohann <kai.grossjohann@gmx.net> writes:

> Oliver Scholz <alkibiades@gmx.de> writes:
>
>> Kai Grossjohann <kai.grossjohann@gmx.net> writes:
>>
>>> Even though I now know how to do for loops in eshell, I was wondering

Somehow I misread this as “Even though I don't know ...” or else I
would have asked: How? instead of assuming that it isn't possible ...

>>> if the following idea might be fun to play with.  Maybe someone has
>>> already done this and would like to share?
>> [...]
>>
>> Loops are the one feature that I am missing in eshell.
>
> for f in a b { echo $f; }               # invokes shell command echo
> for f in a b ( find-file f )            # invokes Lisp command

Funny. All I ever tried is

for f in a b; do echo $f; done

Which doesn't work, obviously.

Thank you very much. What a relief!

    Oliver
-- 
28 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-19 20:04     ` Oliver Scholz
@ 2003-10-19 20:15       ` Oliver Scholz
  2003-10-19 20:45         ` David Kastrup
  0 siblings, 1 reply; 18+ messages in thread
From: Oliver Scholz @ 2003-10-19 20:15 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> Kai Grossjohann <kai.grossjohann@gmx.net> writes:
>
>> Oliver Scholz <alkibiades@gmx.de> writes:
>>
[...]
>>> Loops are the one feature that I am missing in eshell.
>>
>> for f in a b { echo $f; }               # invokes shell command echo
>> for f in a b ( find-file f )            # invokes Lisp command

[...]
> Thank you very much. What a relief!
[...]

I am not quite there yet. I'd sometimes need something like:

for f in `ls` { echo $f }

So what would be the equivalent to bash:

for f in `ls`; do echo $f; done

or

for f in $(ls); do echo $f; done

?

Or is this one of the things eshell can't do? I sometimes use
something like this to rename all files in a directory or all files
with a specific extension or things like that. How would I do this in
eshell from the command line?

    Oliver
-- 
28 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-19 20:15       ` Oliver Scholz
@ 2003-10-19 20:45         ` David Kastrup
  2003-10-20 21:27           ` Kai Grossjohann
  0 siblings, 1 reply; 18+ messages in thread
From: David Kastrup @ 2003-10-19 20:45 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> Oliver Scholz <alkibiades@gmx.de> writes:
> 
> > Kai Grossjohann <kai.grossjohann@gmx.net> writes:
> >
> >> Oliver Scholz <alkibiades@gmx.de> writes:
> >>
> [...]
> >>> Loops are the one feature that I am missing in eshell.
> >>
> >> for f in a b { echo $f; }               # invokes shell command echo
> >> for f in a b ( find-file f )            # invokes Lisp command
> 
> [...]
> > Thank you very much. What a relief!
> [...]
> 
> I am not quite there yet. I'd sometimes need something like:
> 
> for f in `ls` { echo $f }
> 
> So what would be the equivalent to bash:
> 
> for f in `ls`; do echo $f; done
> 
> or
> 
> for f in $(ls); do echo $f; done

for f in ${ls -1} { echo $f; }

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Inject some eshell features into shell?
       [not found]     ` <mailman.1974.1066561040.21628.help-gnu-emacs@gnu.org>
@ 2003-10-20 16:55       ` Kevin Rodgers
  0 siblings, 0 replies; 18+ messages in thread
From: Kevin Rodgers @ 2003-10-20 16:55 UTC (permalink / raw)


Kai Grossjohann wrote:

> Hey, cool!  It's not quite what I meant, but you're showing me the
> interesting bits.  I need to set comint-input-sender to my function,
> and my function needs to fall back using comint-simple-send.


Right.  It would also be nice to keep the shell prompt in sync when you
run an Emacs command:

         (progn
           (comint-simple-send process (concat "# " command "\n"))
           (apply command-symbol (cdr command-list)))

But it looks like that might not get into the input history (see 
comint-input-history-ignore).


> What I meant was something less automatic: Have an alist which says
> which Lisp to invoke depending on the first word.
> 
> But maybe it's also good to use the eshell way of doing things: just
> look for a kshell/foo function if the user entered foo.
> 
> When using eshell, I noticed that many Lisp functions are not suitable
> to be called from the shell prompt.  For example, cvs-update is a good
> candiate, but it requires me to pass FLAGS (and DIRECTORY).  It just
> fees unnatural to type "cvs-update . nil" at the shell prompt, when
> "cvs-update" ought to do.

I think you could use the kshell/foo approach to provide required arguments
that can be inferred from the context (current directory, etc.).

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-19 12:31 ` Loops and scripting in eshell (was: Inject some eshell features into shell?) Oliver Scholz
  2003-10-19 15:06   ` Loops and scripting in eshell Kai Grossjohann
       [not found]   ` <mailman.1980.1066576051.21628.help-gnu-emacs@gnu.org>
@ 2003-10-20 19:48   ` Reiner Steib
  2003-10-21  8:55     ` Oliver Scholz
  2 siblings, 1 reply; 18+ messages in thread
From: Reiner Steib @ 2003-10-20 19:48 UTC (permalink / raw)


On Sun, Oct 19 2003, Oliver Scholz wrote:

> for i in `ls` do ...

Useless use of ls. ;-)  for i in *; do something; done

> 2. Where can I get (comprehensive) documentation for the sh (bourne?)
>    command syntax?

man sh ash bash ksh sh-posix  ;-)
(Or maybe I don't understand the question?)

- Online man pages:
  http://netbsd.gw.com/cgi-bin/man-cgi?sh++NetBSD-current
  http://www.openbsd.org/cgi-bin/man.cgi?query=sh

- "Shell Command Language Index"
  http://www.opengroup.org/onlinepubs/7908799/xcu/shellix.html
- "For Loop" therein:
  http://www.opengroup.org/onlinepubs/7908799/xcu/chap2.html#tag_001_009_004_002

- http://www.unix-systems.org/whitepapers/shdiffs.html

- "The Traditional Bourne Shell Family"
  http://www.in-ulm.de/~mascheck/bourne/
- "Various system shells"
  http://www.in-ulm.de/~mascheck/various/shells/

HTH.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-19 20:45         ` David Kastrup
@ 2003-10-20 21:27           ` Kai Grossjohann
  2003-10-20 23:44             ` Oliver Scholz
  0 siblings, 1 reply; 18+ messages in thread
From: Kai Grossjohann @ 2003-10-20 21:27 UTC (permalink / raw)


David Kastrup <dak@gnu.org> writes:

> for f in ${ls -1} { echo $f; }

Hm.  The fact that the -1 is needed hints at some potential problem.
In the shell, ls behaves differently.  (The -1 is not needed there.)
So maybe some other programs break when used in a similar way?

(I guess the difference has to do with isatty(3).  No idea how
difficult would it be for eshell to do this right.)

What do people think?

Kai

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-20 21:27           ` Kai Grossjohann
@ 2003-10-20 23:44             ` Oliver Scholz
  2003-10-21  9:05               ` David Kastrup
  0 siblings, 1 reply; 18+ messages in thread
From: Oliver Scholz @ 2003-10-20 23:44 UTC (permalink / raw)


Kai Grossjohann <kai.grossjohann@gmx.net> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> for f in ${ls -1} { echo $f; }
>
> Hm.  The fact that the -1 is needed hints at some potential problem.
> In the shell, ls behaves differently.  (The -1 is not needed there.)
> So maybe some other programs break when used in a similar way?
>
> (I guess the difference has to do with isatty(3).  No idea how
> difficult would it be for eshell to do this right.)
>
> What do people think?
[...]

I don't know about the isatty issue. I don't know much about the
underlying lower operating system level. But I'd like to note, that it
seems to work in *some* directories, but not in others:

[lisp] $ for f in ${ls} {echo $f}
2cyr.txt                draw.el           iso646-de.el         single-frame.el

*much more output snipped*

[lisp] $ mkdir test
[lisp] $ cd test
[test] $ touch alpha beta gamma delta
[test] $ for f in ${ls} {echo $f}
Wrong type argument: listp, #("alpha  beta  delta  gamma" 0 25 (escaped t))
[test] $ for f in ${ls -l} {echo $f}
total 0
usage: echo [-n] [object]

    -n                   terminate with a newline
    -h, --help           output this help screen


Does anybody know offhand where in the eshell code `for' is implemented?

    Oliver
-- 
30 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-20 19:48   ` Reiner Steib
@ 2003-10-21  8:55     ` Oliver Scholz
  0 siblings, 0 replies; 18+ messages in thread
From: Oliver Scholz @ 2003-10-21  8:55 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> On Sun, Oct 19 2003, Oliver Scholz wrote:
>
>> for i in `ls` do ...
>
> Useless use of ls. ;-)  for i in *; do something; done

Thanks! As I said, I am a shell dummy. :-)

Ah! And it works with eshell. I am saved.

>> 2. Where can I get (comprehensive) documentation for the sh (bourne?)
>>    command syntax?
>
> man sh ash bash ksh sh-posix  ;-)
> (Or maybe I don't understand the question?)

I was rather looking for something more formal, preferably with a CF
grammar. The "Shell Command Language Index" looks like what I had in
my mind, though. But never mind. Now that I know how to deal with the
simple loops that I need, I am not so keen anymore on implementing sh
syntax.

Thanks again.

This possibility to mix Lisp and shell scripting is way cool. I could
get used to it:

[~] $ mkdir test; cd test
[test] $ touch alpha.test beta.test gamma.test
[test] $ for f in **/*(.) { if (string-match "\\(.*\\)\\.test$" f) { mv $f (match-string 1 f) }}
[test] $ ls
alpha  beta  gamma


    Oliver
-- 
30 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-20 23:44             ` Oliver Scholz
@ 2003-10-21  9:05               ` David Kastrup
  2003-10-21 16:05                 ` Kai Grossjohann
  0 siblings, 1 reply; 18+ messages in thread
From: David Kastrup @ 2003-10-21  9:05 UTC (permalink / raw)


Oliver Scholz <alkibiades@gmx.de> writes:

> Kai Grossjohann <kai.grossjohann@gmx.net> writes:
> 
> > David Kastrup <dak@gnu.org> writes:
> >
> >> for f in ${ls -1} { echo $f; }
> >
> > Hm.  The fact that the -1 is needed hints at some potential
> > problem.  In the shell, ls behaves differently.  (The -1 is not
> > needed there.)  So maybe some other programs break when used in a
> > similar way?

Uh, ls does not "break".  ls is an eshell builtin, and so behaves
completely different.

> > (I guess the difference has to do with isatty(3).  No idea how
> > difficult would it be for eshell to do this right.)

Oh, nonsense.  The difference is that we are not talking /bin/ls here.

> > What do people think?  [...]
> 
> I don't know about the isatty issue. I don't know much about the
> underlying lower operating system level. But I'd like to note, that
> it seems to work in *some* directories, but not in others:
> 
> [lisp] $ for f in ${ls} {echo $f}
> 2cyr.txt                draw.el           iso646-de.el         single-frame.el
> 
> *much more output snipped*

Well, it lists all the lines that "ls" spews out.  If it worked as
"intended", you'd get a single line per entry. without color
attributes.  But eshell ls does something different.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Loops and scripting in eshell
  2003-10-21  9:05               ` David Kastrup
@ 2003-10-21 16:05                 ` Kai Grossjohann
  0 siblings, 0 replies; 18+ messages in thread
From: Kai Grossjohann @ 2003-10-21 16:05 UTC (permalink / raw)


David Kastrup <dak@gnu.org> wrote in message news:<x5y8vf55b3.fsf@lola.goethe.zz>...

> Uh, ls does not "break".  ls is an eshell builtin, and so behaves
> completely different.

D'oh.

Stupid me.  So, eshell/ls needs to be enhanced, it seems.

Kai

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Inject some eshell features into shell?
  2003-10-15 19:36 Inject some eshell features into shell? Kai Grossjohann
                   ` (2 preceding siblings ...)
  2003-10-19 12:31 ` Loops and scripting in eshell (was: Inject some eshell features into shell?) Oliver Scholz
@ 2003-10-22 10:55 ` Matthias Meulien
  3 siblings, 0 replies; 18+ messages in thread
From: Matthias Meulien @ 2003-10-22 10:55 UTC (permalink / raw)


Kai Grossjohann <kai.grossjohann@gmx.net> wrote:

> (...) (Another feature I use a lot is the completion, but I think
> marrying pcomplete and shell-mode isn't going to be difficult.)

In order pcomplete to handle filenames with spaces, you will need the
following.

(add-hook 'shell-mode-hook 
	  '(lambda ()
	     (pcomplete-shell-setup)
	     (setq pcomplete-arg-quote-list comint-file-name-quote-list)))

-- 
Matthias

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2003-10-22 10:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-15 19:36 Inject some eshell features into shell? Kai Grossjohann
2003-10-15 21:07 ` Stefan Monnier
2003-10-17 19:31 ` Kevin Rodgers
2003-10-17 22:44   ` Kevin Rodgers
2003-10-19 10:56     ` Kai Grossjohann
     [not found]     ` <mailman.1974.1066561040.21628.help-gnu-emacs@gnu.org>
2003-10-20 16:55       ` Kevin Rodgers
2003-10-19 12:31 ` Loops and scripting in eshell (was: Inject some eshell features into shell?) Oliver Scholz
2003-10-19 15:06   ` Loops and scripting in eshell Kai Grossjohann
     [not found]   ` <mailman.1980.1066576051.21628.help-gnu-emacs@gnu.org>
2003-10-19 20:04     ` Oliver Scholz
2003-10-19 20:15       ` Oliver Scholz
2003-10-19 20:45         ` David Kastrup
2003-10-20 21:27           ` Kai Grossjohann
2003-10-20 23:44             ` Oliver Scholz
2003-10-21  9:05               ` David Kastrup
2003-10-21 16:05                 ` Kai Grossjohann
2003-10-20 19:48   ` Reiner Steib
2003-10-21  8:55     ` Oliver Scholz
2003-10-22 10:55 ` Inject some eshell features into shell? Matthias Meulien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.