Forum Stats

  • 3,741,216 Users
  • 2,248,392 Discussions
  • 7,861,675 Comments

Discussions

Support for external pager

user7543419
user7543419 Member Posts: 5
edited Jan 7, 2019 10:43AM in SQLcl

How do I get results sent to an external pager command (such as less/more)?

If there is currently no way to do this, I'd like to make this a feature request.

Being able to navigate/search query results with an external pager is a very useful thing and support for this should be a basic feature in my opinion.

Thanks.

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,777 Bronze Crown
    edited Jan 6, 2019 7:38PM

    I achieve similar functionality via spool to a file and use my favourite text editor, vi (vim).

    SQL> set _editor=vim

    SQL> spool a_file.txt

    SQL> select col1, ...coln from a_table where...

    SQL> spool off

    SQL> ed a_file.txt

    ...

  • user7543419
    user7543419 Member Posts: 5
    edited Jan 7, 2019 10:43AM

    I though of that, but really?  What a pain to have to do something like that around every query!  BTW instead of 'ed a_file.txt' I'd probably use 'ho less a_file.txt;rm a_file.txt'.

Sign In or Register to comment.