- Subject: Re: [jed-users] xjed STDIN?
- From: Tom Culliton <tom.culliton@xxxxxxxxx>
- Date: Fri, 23 Sep 2016 23:10:21 -0400
That seems like a really indirect and verbose way of saying:
jed $(grep -l pattern *.c *.h)
or:
xjed $(grep -l pattern *.c *.h)
Or even for very large lists:
grep -l pattern *.c *.h | xargs jed
On Fri, Sep 23, 2016 at 9:17 PM, John E. Davis <jed@xxxxxxxxxxx> wrote:
> Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx> wrote:
> > Is it possible to use xjed as a GUI pager for STDIN?
> > Something like:
> >
> > some commands ... | xjed -most
>
> If you add
>
> define read_from_stdin ()
> {
> if (isatty (stdin))
> return;
>
> sw2buf ("*stdin*");
> array_map (Void_Type, &insert, fgetslines(stdin));
> bob ();
> }
>
> to your .jedrc file, then you can invoke xjed via:
>
> $ some-command ... | xjed --read-from-stdin -f most_mode
>
> I use similar function:
>
> define stdin_files ()
> {
> ifnot (bufferp ("*stdin*"))
> return;
>
> setbuf ("*stdin*");
> bob ();
>
> do
> {
> variable file = line_as_string ();
> if (strlen (file))
> {
> () = find_file (file);
> setbuf ("*stdin*");
> }
> }
> while (down_1 ());
> }
>
> This function permits me to use jed as follows:
>
> $ grep -l pattern *.c *.h | jed --stdin-files
>
> For xjed, you would need to combine the two functions:
>
> $ grep -l pattern *.c *.h | xjed --read-from-stdin --stdin-files
>
> I hope this helps.
> --John
>
> _______________________________________________
> For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
>
>
[2016 date index]
[2016 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]