rubikitch | 27 Sep 04:57
Favicon

`ee' with history

Hi,

I redefined `ee' to place the contents of $EE in the history list.

function ee () { set -v; print -s -f "%s" "`cat $EE`"; . $EE $*; set +v; }

--
rubikitch
http://www.rubyist.net/~rubikitch/
Xavier Maillard | 27 Mar 02:00

Re: `ee' with history


   Hi,

   I redefined `ee' to place the contents of $EE in the history list.

   function ee () { set -v; print -s -f "%s" "`cat $EE`"; . $EE $*; set +v; }

I am late on this but how do I use it ? Where should I put this ?
Is this part of the official eev package (now) ?

	Xavier
--

-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org
Xavier Maillard | 5 Apr 02:00

Re: `ee' with history


      Hi,

      I redefined `ee' to place the contents of $EE in the history list.

      function ee () { set -v; print -s -f "%s" "`cat $EE`"; . $EE $*; set +v; }

   I am late on this but how do I use it ? Where should I put this ?
   Is this part of the official eev package (now) ?

Do you have an answer to this (simplistic) question ?

Regards,

	Xavier
--

-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org
Eduardo Ochs | 6 Apr 08:22

Re: `ee' with history

Hi Xavier,

> > Hi,
> >
> > I redefined `ee' to place the contents of $EE in the history list.
> >
> > function ee () { set -v; print -s -f "%s" "`cat $EE`"; . $EE $*; set +v; }
>
> I am late on this but how do I use it ? Where should I put this ?
> Is this part of the official eev package (now) ?

"print -s" is a zshism... see:

  (find-node "(zsh)Shell Builtin Commands" "\nprint" "-s")

It says: "-s: Place the results in the history list instead of on the
standard output."

I prefer to keep the old "ee" and Rubikitch's trick in two separate
functions:

  # See:
  # http://angg.twu.net/.zshrc.html#ee
  # http://angg.twu.net/.zshrc.html#eeh
  # http://angg.twu.net/.zshrc.html#hh
  function ee  () { set -v; . $EE$*; set +v; }
  function eeh () {
      print -s -f "%s" "$(cat $EE)";
      echo "(Added to history:)";
      cat $EE;
(Continue reading)


Gmane