* feat: add *Nushell* support
* refactor: use `sh` to swap `STDOUT` and `STDERR` instead of using a temporary file
* feat: include both keybindings, with the current REPL buffer passed to *Atuin*'s
* feat: don't record commands run by keybindings
* Delete all instances of a command
Our search command will de-dupe results by default. But... This isn't
great for deleting! You don't want to run it over-and-over-and-over
until all commands are deleted.
Loop the query, and keep on deleting what it returns until they are all
gone.
* Optimize delete upload
It was running a request for every element, on every sync lol
Only push a delete if needed
Future: push all deletes in one request
* Make search_mode a part of SearchState
* Allow changing search mode using ctrl+s
* Tweak state reset for switched_search_mode
* Improve search_mode display in interactive mode
* Incorporate review suggestion
* Tweak language
* Fix Clippy and format
* Drop events. I'd still like to do them, but differently
* Start adding delete api stuff
* Set mailmap
* Delete delete delete
* Fix tests
* Make clippy happy
* skim-demo
* skim some more
* Weight first word match higher (#712)
* some improvements
* make skim opt-in
---------
Co-authored-by: Frank Hamand <frankhamand@gmail.com>
* Fix before/after combined with limit
Mixing filters done in Rust with filters done in SQL is _no bueno_.
Been meaning to do this for a while anyways. Search params are getting a
bit fat but oh well!
* Make an excuse for a big function sig
* Do options map_or not if
* Fix tests
* adds support for getting home dir in windows
* fixes bug
* adds windows server support + build for linux ^| todo: test server on linux
* improvements to redability
* removes comment
* returns if windows when importing auto
* this should be here, to prevent double inputs
* adds explanation to why we have to throw away 1 event in the tui
* better message when running atuin import on windows + spell fix
* feat: add common default keybindings
* feat: add `WORD_SEPARATORS` to config as `word_chars`, as this is what *Zsh* calls it
* feat: add option for *Emacs* word jumping
* feat: scroll with `PageUp` and `PageDown`, cf #374
* Only show help if terminal strictly has more than one line
* There is no border around the input line in compact mode
* Add command preview
* Dynamic preview height
* Avoid extra allocations
Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
* Address clippy error
* Merge normal and compact views code
* Add show_preview setting, disabled by default
* Convert `bool` to `int` with `if` for legibility
---------
Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
* Remove shortcut numbers
I was also going to remove the offset so scrolling only happens at the
top. But tbh, I quite like it this way.
* Remove key binding
Adds a new `history_filter` setting through which users can specify a
list of regular expressions that match commands that should not be
recorded in the history.
* Allow logging in without overwriting existing key file
If the given key on login in empty, keep the existing key file rather
than overwriting it with an empty file. This is useful if you log out
and want to log in again and still use the same key, or if you have
copied over the key file rather than providing it as input.
* Refuse logging in if key is empty
Before the previous commit, an empty key file would be created if key
wasn't specified, and after the previous commit, the key file would not
be created if the key wasn't specified and stay empty if it was empty.
Now the log command checks the key file if a key is not specified and
exits with an error message if either the key file couldn't be opened or
is empty. If a key is specified, the key file is just created with it as
before.
* Validate the key on login, create new if no exists
After reading the key either from an existing key file, or from the user
input, validate that the provided key is valid (rather than just
checking that it isn't empty). If no key file exists, create a new key
instead of erroring out.
* feat(history): Add new flag to allow custom output format
* more efficient formatting
* add user and host
* docs
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* Rework `atuin init`
This allows users to disable the CTRL-R and Up Arrow bindings,
independently from one another
* Document --disable-{ctrl-r,up-arrow}
* Apply suggestions from code review
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* Allow overriding filter and search modes from CLI arguments
* Use session filter mode for bash up key binding
* We precisely do not want to add quotes here so that all arguments are properly passed
* Add --shell-up-key-binding hidden command argument and filter_mode_shell_up_key_binding configuration option to allow customizing the filter mode used when atuin is invoked from a shell up-key binding
* Correct up binding for zsh
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* Add event data structures
This adds the data structures required to start syncing events, rather
than syncing history directly.
Adjust event
Fix
Add event data structure to client
* Add server event table sql
* Add client event table migration
Adjust migration
* Insert into event table from client
* Add event merge function
Right now this just ensures we have the right amount of events given the
history we have
BUT it will also be used to merge CREATE/DELETE events, resulting in
history being deleted :)
* Make CI happy
* Adjust
* we don't limit history length any more
* Update atuin-client/src/database.rs
Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
* fix usage
* Fix typo
* New Rust, new clippy stuff
Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>