Forum Stats

  • 3,733,150 Users
  • 2,246,705 Discussions
  • 7,856,536 Comments

Discussions

Support for external pager

user7543419
user7543419 Member Posts: 5
edited January 2019 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,776 Bronze Crown
    edited January 2019

    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 January 2019

    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.