* [feature] store env variables in History records
WIP: remove `HistoryWithoutDelete`, add some docstrings, tests
* Create History objects through builders.
Assure in compile-time that all required fields
are set for the given construction scenario
* (from #882) split Cmd::run into subfns
* Update `History` doc
* remove rmp-serde from history
* update warning
---------
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* wip
* Start testing
* Store host IDs, not hostnames
Why? Hostnames can change a lot, and therefore host filtering can be
funky. Really, all we want is a unique ID per machine + do not care what
it might be.
* Mostly just write a fuckload of tests
* Add a v0 kv store I can push to
* Appending works
* Add next() and iterate, test the pointer chain
* Fix sig
* Make clippy happy and thaw the ICE
* Fix tests'
* Fix tests
* typed builder and cleaner db trait
---------
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* Add `delete_at` is null condition during search
Since entries are searched everytime a delete process ends, the
--delete-it-all command will enter an infinite loop if searching the
whole history.
* Remove command blanking
Command blanking may violate the `unique(timestamp, cwd, command)`
condition.
* Overwrite command with random string when deleting
* Add rand dependency to client crate
---------
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
With this change Ctrl-d behaves differently depending on whether there
is any input text available. If there is, it will delete the character
to the right of the cursor if there is any. If there isn't it will
instead quit interactive mode and leave the original shell command line
unchanged.
This matches other line-based tools like bash and fzf.
* Extract scrolling code into functions
* Fix movement keys when inverted
* remove extra len param
---------
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
Typo in config key `filter_mode_shell_up_key_binding` that's fixed by
this commit, and while at it fix a minor typo in a comment.
Co-authored-by: Per Modin <per@wgtwo.com>
* Put input chunk at the top in inline mode
* Invert the search results if bar is at top
* fix styling on reversed rendering
* add setting
* settings
---------
Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* Stop running triggers on history delete
* Move to account management dir
* Alter trigger function to only run for inserts
* wip
* Add atuin account subcommands, and re-org delete
* Clarify docs
* Delete silly dupe migration
* Um where did this come from
* Oops, insert only plz
* At least patch this on the server side so we don't loop forever
* Postgres doesn't support <microsecond precision
Use millis - almost everything should support them and they are still
faster than a human can reasonably spam a button.