The following is a feature wish list related to Eshell, the Emacs shell.

Broader wishes for Emacs should be wished at WishList.

Bugs should be reported like other EmacsBugs. Check if it's already been reported.

I don’t see anywhere to report eshell bugs, so how about here:

    $ mkdir foo; cd foo; touch 1 2 3
    $ ls
    1  2  3
    $ ls | wc -l
In any other shell the last output would say “ 3” since piping ‘ls’ output causes the ‘-1’ flag to be implicitly used. It should do in eshell too. – ZwaX

Here’s one way to do it. Override the function eshell/ls like so:

  (defsubst eshell/ls (&rest args)
  "An alias version of `eshell-do-ls'."
  (let ((insert-func 'eshell-buffered-print)
 (error-func 'eshell-error)
 (flush-func 'eshell-flush)
 (args-plus (append
                    (cond ((not (eq (car (aref eshell-current-handles 1)) t))
                           (list "-1")))
    (eshell-do-ls args-plus)))

This seems to work for eshell 2.4.2. Not sure how future-proof it is since it redefines a function defined in em-ls.el… If the author reads this wiki, perhaps he will see fit to include this logic in eshell-do-ls. – JoeE

(2004-03-10 - TaKa) Hi everyone, I’m new here. I’ve got several questions regarding Eshell.

Say I defined the following trivial function

 (defun foo (x)
   (int-to-string x))

and sent several inputs on Eshell as follows.

Input 1:

     $ echo { concat {foo 1} "_some-string" }
     Wrong type argument: sequencep, 1

Input 2:

     $ echo {foo 1}

Input 3:

     $ foo 1

Input 4:

    $ foo 10
    Wrong type argument: numberp, #("10" 0 1 (number t rear-nonsticky (arg-begin arg-end)) 1 2 (rear-nonsticky (arg-end arg-begin)))

Can anyone explain why input 1 doesn’t work when input 2 does; why input 4 doesn’t when input 3 does?

Suppose further that I changed the function ‘foo’ to:

 (defun foo()
   "0001" )

and typed some more commands from Eshell as follows:

Input 5:

    $ foo

Input 6:

    $ echo {foo}

It seems that Eshell “truncates” the preceding 0’s regardless of whether the type of the returned value is “string” or “integer” when the expression is enclosed in ‘{’ and ‘}’. Does anyone know how to output ‘0001’ literally? Any solutions or hints are welcome. Thanks. – TaKa

(2004-03-10 - TaKa)

I just got myself several answers to my questions 😊

Solution to the problem of input 1-2:

 $ echo { concat (foo 1) "_some-string" }

Solution to the problem of input 5-6:

 $ echo (foo)

I think Eshell treats the input `echo {foo}’, as (sort of like) `echo { echo 0001 }’, whose output is also ‘1’. It is obvious that eshell treats 0001 as an integer (thus becomes ‘1’) when the expression is enclosed in ‘{’ and ‘}’. But I don’t know why Eshell gives ‘0001’ on input ‘echo 0001’, not ‘1’ (wouldn’t it be inconsistent?).

My number one eshell wish: documentation. Both a reference and a tutorial. Without the latter, I’m just too lazy to learn it.

CategoryEshell CategoryWishList