Commit Graph

312 Commits

Author SHA1 Message Date
48e33d5034 Make the query input box in the TUI match the terminal dimensions 2023-09-14 21:14:16 -07:00
328c35a096 Add presaving support for fish 2023-09-14 21:03:36 -07:00
c5a7245991 Add bug fix for presaving history where entries would sometimes end up duplicated 2023-09-14 21:01:13 -07:00
01d9924cc0 Check sqlite DB error messages with Contains to be slightly more lenient 2023-09-14 12:32:50 -07:00
d4e01ceb11 Add another error message substring for detecting errors due to being offline, to improve #30 2023-09-13 22:49:40 -07:00
e8ceb02138 Move tui.go out of lib and into a separate package 2023-09-13 22:47:48 -07:00
6d6a1a5e12 Move a bunch of update-specific code out of the generic lib.go file and into the update command 2023-09-13 22:45:49 -07:00
b6b4dbe37a Add tests for presaving history entries 2023-09-13 20:29:06 -07:00
6540b4dbf6 Improve logged error messages for API failures 2023-09-13 20:24:25 -07:00
763c8208f7 Make RetryingDbFunction more lenient so that it always ignores UNIQUE constraint errors, since if a DB.Create returns a UNIQUE error, then the create is not actually necessary 2023-09-13 19:20:15 -07:00
f1e2b8ddbf Update TestSortByConsistentTimezone to not use a golden for tquery since it was leading to occasional flakes, and swap it to using a regex. Also add a test for hishtory export as part of the sorting tests. 2023-09-12 19:09:01 -07:00
57c5a69f7d Fix bug where we failed to delete pre-saved history entries due to race conditions causing the DB to be locked 2023-09-12 18:55:13 -07:00
9b871e93ed Fix consistent time zone sorting test to account for table sizing differences on github actions 2023-09-10 17:13:48 -07:00
e3e3a7bd0d Add tablesizing command to get consistent table dimensions 2023-09-09 14:02:47 -07:00
2ccbb8d587 Store timestamps in DB in Unix time, and display them in the Local time for consistent TZs in displays, and to ensure ordering is correct
This fixes a bug where entries could be out of order if they were recorded on machines in different TZs (e.g. if one machine had the TZ set to UTC). Admittedly, this commit isn't a perfect fix since
it doesn't change all the existing hishtory entries to be stored in UTC, but this just means that the ordering bug will continue to exist for historical entries, but be fixed for new entries. And
for our purposes, that is good enough. :)

 # Please enter the commit message for your changes. Lines starting
2023-09-09 12:28:01 -07:00
223598c8f2 Remove golden that was forked for actions, that didn't need to be 2023-09-09 11:56:06 -07:00
c73b10011b Add TODO for a bug where sorting entries by timestamps in different timezones causes issues 2023-09-07 18:09:30 -07:00
578113e07c Revert "use errors.Is to determine what the error is" since it doesn't work with modernc.org/sqlite which we need in order to avoid using CGO (which we do to enable easy cross-compiles)
This reverts commit 1589f77956. When building with CGO_ENABLED=0, this code will fail to build.
2023-09-06 20:21:00 -07:00
c5bdee9ad5 Merge pull request #102 from lsmoura/sergio/no-ctx-ptr
Remove context pointers since there is no need to pass around a pointer to an interface
2023-09-06 19:58:08 -07:00
a12b0e5f6f no context pointers 2023-09-05 15:45:17 -04:00
1589f77956 use errors.Is to determine what the error is 2023-09-05 15:37:42 -04:00
83ad8c7b1f wrap errors with %w instead of using %v 2023-09-05 15:08:55 -04:00
3b07aa9a37 Split testTui method into separate smaller test methods that are more specific 2023-09-01 15:42:02 -07:00
a53485f04b Remove TODOs that were fixed in 23a377e3c1 2023-08-29 19:03:12 -07:00
23a377e3c1 Preserve cursor position after deleting entries and resizing 2023-08-29 18:59:20 -07:00
66f3dc13ec Add support for displaying the user as a column via the 'User' column 2023-08-28 12:19:14 -07:00
2490082088 no-op refactoring: Move history entry building code from lib.go to cmd file for saving history entries 2023-08-27 22:05:24 -07:00
fe41687fd0 Remove extraneous new lines from TUI that make the UI jump around for invalid search atoms 2023-08-27 21:47:44 -07:00
5dae81d336 Sort by start_time in beta mode only, to fix failing tests caused by changing the sorting 2023-08-27 15:20:40 -07:00
25ec191f1a Implement pre-saving feature to ensure that long-running/non-terminating commands are saved in hishtory 2023-08-27 14:24:59 -07:00
a79d401058 Make queries async for better TUI performance when sqlite is slow 2023-08-27 11:42:17 -07:00
311b698388 Add TODOs 2023-05-19 17:16:54 -07:00
9f2b392ddb Add key binding to select an entry and cd into that directory 2023-05-19 17:14:33 -07:00
06cbd0e7f3 Add extra string split so the test passes on github actions 2023-05-17 08:38:47 -07:00
082d342b0d Add test to cover breakage in #82 2023-05-16 17:34:25 -07:00
c0e56eff0d Fix #82 by ensuring that the results list also filters out duplicates 2023-05-16 17:12:52 -07:00
0b13a9705d Fix control-K in offline mode for #80 2023-04-30 08:50:17 -07:00
765c1c18d0 Remove && false to enable the getwd syscall as a fallback 2023-02-28 17:44:05 -08:00
ff24b66fce Fix unescape function per comments on #73 and add tests for searching for a backslash 2023-02-20 15:46:39 -08:00
0a694c39d5 Add workaround for #69 that avoids go's getCwd method that relies on stat rather than getwd 2023-02-20 12:42:23 -08:00
5089058165 Add missing help page text for a golden 2023-02-20 12:33:22 -08:00
c03f9d3d76 Add tests for opening and closing the help page 2023-02-20 12:15:27 -08:00
be5338ee21 Add updated goldens for help page 2023-02-20 11:56:16 -08:00
11c110e13e Add untested version of help page 2023-02-20 10:54:16 -08:00
b69788967f Fix bug where typing 'foo:' and then hitting backspace would lead to the error still being displayed 2023-02-19 22:08:38 -08:00
dc65fffd7b Add an index on end_time to ensure that initial queries are fast to fix #68 2023-02-18 22:26:18 -08:00
27cd544524 Add support for arm7 for #63 to support raspberry pis 2023-02-18 22:00:39 -08:00
f2298def32 Ignore a single dash as a token to improve search behavior for queries like 'ls -' to improve #67 2023-02-18 21:46:51 -08:00
2ae54ef74e Simplify stripBackslash 2023-02-14 08:47:38 -08:00
a5926af49c Unit tests for Search taking advantage of escaping 2023-02-13 22:32:42 -08:00