jed-users mailing list

[2016 Date Index] [2016 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[jed-users] Re: xjed STDIN?


On Fri 2016-09-23 (18:39), Ulli Horlacher wrote:
> Is it possible to use xjed as a GUI pager for STDIN?
> Something like:
> 
> some commands ... | xjed -most

With John Davis help I have now:

root@diaspora:/sw/ubuntu-12.04/jed-0.99.20-116/bin# cat xmost
#!/bin/sh
if [ -t 0 ]; then
  exec xjed "$@"
else
  exec xjed -f most_stdin
fi


framstag@diaspora:/sw/share/jedlib-0.99.20-116/lib: fpg -p stdin defaults.sl 

defaults.sl:
define read_from_stdin() {
  sw2buf("*stdin*");
  array_map(Void_Type,&insert,fgetslines(stdin));
  bob();
  set_buffer_modified_flag(0);
}

define most_stdin() {
  read_from_stdin;
  most_mode;
  local_setkey("exit",char('q'));
}




> Extra points for autoadjusting window size to text length :-)

It seems this is not possible.

-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<20160923163917.GB13882@xxxxxxxxxxxxxxxxxxxx>
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.


[2016 date index] [2016 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]