Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: piping question



On Oct 3, 10:55am, Helmut Jarausch wrote:
> Subject: Re: piping question
>
> On 10/03/2014 04:29:10 AM, Bart Schaefer wrote:
> > 
> >     xmost() {
> > 	() { xterm -g 180x30+0+0  -hold -e "most < $1" } <(cat)
> >     }
> > 
> 
> Many thanks, that works just fine.

For completeness:

    xmost() {
      set - "${(qq)@}"  # Requote command line arguments
      if [[ -t 0 ]]
      then
        xterm -g 180x30+0+0  -hold -e "most $*"
      else
        () { xterm -g 180x30+0+0  -hold -e "most $* < $1" } <(cat)
      fi
    }

-- 
Barton E. Schaefer



Messages sorted by: Reverse Date, Date, Thread, Author