Commit Graph

82 Commits

Author SHA1 Message Date
Phil Hord
3f7f80e32c Squash various compiler warnings
Unused-result from sensitive APIs, printf/scanf formatting types, set
but never used variables, and uninitialized variables.

Also there's one select(enum) that doesn't cover all cases.
2018-03-29 10:49:45 -07:00
Phil Hord
eee7d0ddfc Squash a bunch of signed/unsigned warnings 2018-03-29 10:49:38 -07:00
Timothy Stack
ef34a6aaaf [search] display lines matching the search in preview instead of jumping to the first
Jumping around can be disruptive, instead show matches in
the preview window.
2018-03-28 07:25:10 -07:00
Phil Hord
1ae4a04e42 Replace mkstemp with std::tmpfile
TMPDIR is not always defined in the environment but the code doesn't check
for that. Let's used std::tmpfile instead.

Maybe an easier fix is to perform the tmpdir lookup better, but that is
also noisy since the search for a decent tmpdir is based on lore.

std::tmpfile() is rather clean. However it does not leave a nice filename
name around for debugging, so I understand why it might not be preferred.

Fixes #495
2018-03-13 19:36:03 -07:00
Timothy Stack
7f99955cbc [misc] fix a perf issue when previewing commands and some sql fixes 2018-02-07 11:06:59 -08:00
Suresh Sundriyal
0c88eeeb07 Fix lnav builds on OpenBSD.
* Remove all the wordexp related unused headers and code.
* stdout does not appear to be reassignable on OpenBSD.
* defining _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_ seems to fix the const
  correctness related redefinitions between wchar.h imported from
  the system libc and the one imported by clang++ STL.
2017-10-28 05:21:02 -07:00
Timothy Stack
16fd7ec785 [help] remove old command help and add some more filesystem extensions 2017-04-16 15:07:41 -07:00
Timothy Stack
085ea321ea show some more preview 2017-04-10 23:02:50 -07:00
Timothy Stack
bbf8bdc4ec [search-table] highlight the captured text for preview
Defect Number:
    Reviewed By:
   Testing Done:
2017-04-09 17:55:52 -07:00
Timothy Stack
fea3cb83d9 [sql] preview table definition
Defect Number:
    Reviewed By:
   Testing Done:
2017-04-09 01:57:19 -07:00
Timothy Stack
914f4cf4bb [filter-out] show a preview of the filter effects by highlighting matches in red
Defect Number:
    Reviewed By:
   Testing Done:
2017-04-07 23:11:57 -07:00
Timothy Stack
78119dc9f1 fixing some minor issues
Fixes #255
2017-04-05 07:05:19 -07:00
Timothy Stack
00ebd10d71 [cmds] do a dry-run of a command to check for errors
Defect Number:
    Reviewed By:
   Testing Done:
2017-04-02 07:17:31 -07:00
Timothy Stack
411ea1fbee [help] show help text for SQL functions
Defect Number:
    Reviewed By:
   Testing Done:
2017-03-31 07:01:11 -07:00
Timothy Stack
8776f6a703 [sql] do some minimal parsing/annotation of SQL statements
Defect Number:
    Reviewed By:
   Testing Done:
2017-03-26 06:02:53 -07:00
Timothy Stack
0b157ff867 [sql] add function adapter template
Defect Number:
    Reviewed By:
   Testing Done:
2017-03-19 07:50:01 -07:00
Timothy Stack
c180c44e49 [vtab] add an lnav_view_stack table to get programmatic access to the view stack
More progress towards #377
2017-03-04 15:22:19 -08:00
Timothy Stack
89f8ef9c2b [hotkeys] hotkey configuration
First steps to implementing #350
2017-01-21 07:41:28 -08:00
Timothy Stack
44d93dddc3 [pretty-print] allow formats to do transforms before pretty-printing
Also started upgrading to C++11.

Fixes #353
2016-12-05 16:34:30 -08:00
Timothy Stack
a7a03470d7 [search] fix a typo in the timeval compare operator
Defect Number:
    Reviewed By:
   Testing Done:
2016-11-22 23:03:40 -08:00
Timothy Stack
4de576fba7 [search] after a search has been entered, move to the first hit if one is found quickly
Defect Number:
    Reviewed By:
   Testing Done:
2016-11-22 21:02:01 -08:00
Timothy Stack
8de5d3b749 [logfile] add more options when opening files 2016-03-12 14:12:23 -08:00
Timothy Stack
2b2e1c0af9 [sql] add parens to function complete values and do not open empty output files from scripts 2016-03-11 09:11:26 -08:00
Timothy Stack
cdd43549ab [cmds] automatically capture echo/write output from scripts so they can generate reports
Add another example script, dhclient-summary.

Add a 'search-table' section to formats so you can automatically
define a search-based table.
2016-03-06 23:58:37 -08:00
Timothy Stack
f81d4aefd8 [logview] some more work on highlighting out-of-time-order messages 2016-03-05 14:20:14 -08:00
Timothy Stack
a2b381ca19 [config] initial impl with clock-format as the only option at the moment 2016-01-05 06:18:58 -08:00
Timothy Stack
e5f786bc2c [script] add metadata to script files 2015-12-28 20:30:04 -08:00
Timothy Stack
e07b4e448f [exec] add a prompt to execute lnav scripts 2015-12-18 22:39:27 -08:00
Timothy Stack
2b5447f59c [sql] add a log_search table 2015-08-05 23:18:19 -07:00
Timothy Stack
cc5e70fb30 [cmd] add help to the command prompt 2015-08-03 06:49:07 -07:00
Timothy Stack
7679599afc fix a refactor error 2015-07-08 07:05:11 -07:00
Timothy Stack
6b971ccd66 move stuff out of lnav.cc
Defect Number:
    Reviewed By:
   Testing Done:
2015-07-08 06:35:36 -07:00