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.
* Try different workspace structure
Move main crate (atuin) to be on the same level with other crates in
this workspace
* extract common dependencies to the workspace definition
* fix base64 v0.21 deprecation warning
* questionable: update deps & fix chrono deprecations
possible panic sites are unchanged, they're just more visible now
* Revert "questionable: update deps & fix chrono deprecations"
This reverts commit 993e60f8de.
Add `-r/--reverse` flag to `atuin search` to allow searching by oldest
results first.
Example to find the oldest `cargo` command:
```
atuin search --limit 1 --reverse cargo
```
* Use XDG data directory for fish import
On MacOS, atuin was looking for fish history under "$HOME/Library/Application Support".
Now atuin honors XDG_DATA_HOME, if set, and otherwise uses "$HOME/.local/share".
* cargo fmt
---------
Co-authored-by: Charles Gould <charles@gould.dev>
* Updated client config docs
- Example `config.toml` now includes all the newest options
- `settings.rs`, `config.toml`, and `config.md` now have uniform option order
* Remove trailing space
This flag allows the user to continue searching at an offset. This is
useful for building tools that use atuin to search for previous
commands and return only one result.
```
atuin search --limit 1
atuin search --limit 1 --offset 1
atuin search --limit 1 --offset 2
```
* 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
* Support old msgpack
I forgot it isn't backwards compatible... This should fix any sync
issues resulting from the deletion PR
* Update atuin-client/src/encryption.rs
Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
* Bye bye unwrap
---------
Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
* 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
* 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>
* Rework Bash import
Closes#745
- Imported history is now ordered correctly
- Timestamps (when `HISTTIMEFORMAT` is set) are handled correctly
* Timestamp tests test for strict sorting
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 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>
* Batch input events and only query once they are finished
This simplifies the code a lot (no more bounded channel) and yields
the same performance improvement with scroll wheel spam while fixing copy/paste
* Clippy
* fmt
* Use blocking wait before emptying events channel
This was causing a busy loop
* Update query on filter mode change
06ac9587 Show current version on server index (#436)
706b1aff Disable ARM docker builds (#438)
f2abc23a Update README.md
3c2b0550 Noyez fix dir hostname utf8 (#430)
3f5350de [feature] Add scroll wheel support to interactive history search (#435)
dcdde225 Fix text outline for dark mode
9ac0c60c Implement cursor (#412)
119ab9e0 Adds password prompt for register and login (#424)
e5df809d Noyez zsh histdb import (#393)
b08e2543 Improve default fish keybindings (#420)
4096c6ee Update README.md
cd2a3ab7 Add fish shell to key binding docs (#418)
b2782110 Bump clap_complete from 3.1.3 to 3.1.4 (#397)
ee66c0a1 Bump axum from 0.5.5 to 0.5.6 (#415)
4297e263 Bump tokio from 1.18.1 to 1.18.2 (#396)
dbd9ca53 Bump clap from 3.1.16 to 3.1.18 (#401)
a7c9d19d Bump tower-http from 0.3.2 to 0.3.3 (#399)
3b79f686 Bump axum from 0.5.4 to 0.5.5 (#402)
f3407710 Cleanup dependencies – disable unnecessary or unused features (#407)
ab294cde Don't pollute shell environment - remove 'id' variable (#408)
14b30606 Allow to build atuin server without client (#404)
5e4e8d11 Don't create config dir for server in default location if not needed (#406)
b7946cc9 Update Chinese version README.md (#403)
e0291f67 Update README.md
301190e4 Build ARM docker image in GitHub Actions using QEMU (#400)
1d030b9d Importer V3 (#395)
d3a4ff95 Bump clap from 3.1.15 to 3.1.16 (#392)
e9d2ec4b Add ctrl-k and ctrl-j for up and down (#394)
25afb5b2 Bump serde_json from 1.0.80 to 1.0.81 (#387)
4a839dab Adds stats summary (#384)
7a394b01 Bump serde from 1.0.136 to 1.0.137 (#375)
edd3f812 Bump clap_complete from 3.1.2 to 3.1.3 (#377)
d85d03d9 Bump log from 0.4.16 to 0.4.17 (#382)
dc3b7ef5 Bump tokio from 1.18.0 to 1.18.1 (#383)
12440c1c Bump serde_json from 1.0.79 to 1.0.80 (#376)
731042f4 Bump tower-http from 0.3.1 to 0.3.2 (#378)
82505e61 Bump clap from 3.1.12 to 3.1.15 (#381)
e05c19d0 Add Chinese documentation translation & Fix spelling mistakes (#373)
6e280e25 Add Russian documentation translation (#365)
40efdd11 Bump http from 0.2.6 to 0.2.7 (#368)
8bc5becc Bump tower-http from 0.3.0 to 0.3.1 (#367)
172ac8db Create FUNDING.yml
7cdd00b5 Bump tokio from 1.17.0 to 1.18.0 (#357)
9d2e9ea1 Search: Allow specifiying the limited of returned entries (#364)
93ab4e78 ignore JetBrains IDEs, tidy-up imports (#348)
2cb4cb39 Bump axum from 0.5.3 to 0.5.4 (#355)
796644e2 Add created_at column to users (#354)
f8233bcb SQLx cannot run this migration OK (#353)
d8ef5dd9 fix db range query (#351)
5926ea64 fix import auto for bash (#352)
43d299fd bump tui (#346)
8ac6571b Remove all select * from the server queries (#347)
4030de4b Add btree index on history table (#345)
b692e0ce Bump tower-http from 0.2.5 to 0.3.0 (#343)
3680f4ac Bump clap from 3.1.11 to 3.1.12 (#342)
7f5310a1 history list (#340)
* Attempting to implement zsh-histdb import
Import compiles passes tests, but doesn't run b/c of async runtime.
zsh-histdb uses sqlite, and sqlx-rs is async, but import code is sync.
* More working on importing histdb
* Rewriting tests and using `Vec<u8>` instead of `String`
- Rewriting tests to eliminate depencency on local file system
- Using `Vec<u8>` for command strings instead of `String` to eliminate
the utf8 errors i was seeing previously. Seems to be working.
* Running fmt
Co-authored-by: Bradley Noyes <b@noyes.dev>
* Disable unnecessary features of config crate, keep only toml
The atuin documentation only mentions the TOML format for configuration
files, but the config crate supports many other formats by default,
which increases the binary size by about 300 kiB.
* Disable unused features of cli-table crate
This doesn't seem to have noticeable effect on the binary size, but
disabling them cleans up the dependency tree a bit.
a050faa Use `--locked` flag for CI builds (#337)
8737474 Update Cargo.lock (#336)
eab1dbf sql builder (#333)
Fixed to include an updated lockfile that was missed in the last release
Thank you for the rapid report @orhun!
* Add history filters, and hotkey toggle
Switch between different search modes to narrow down the history you
want - global search for all history, host for all history from your
current machine, session for the current shell session, and directory
for the current directory
The default can be configured via `filter_mode`
* Update docs
* Add context
f861893 Update to clap 3.1.x (#289)
e8f7aac Add compact mode (#288)
1e04c4c Add rust-version to Cargo.toml (#287)
222e52b Update Dockerfile
fae118a Improve fuzzy search (#279)
7cde55a Add code of conduct (#281)
d270798 Update config-rs (#280)
3248883 Update README.md
7f58741 Fix `history list --cwd` errors (#278)
e117b62 Update fish bindings. (#265)
4223ac6 Restore bash 4.2 compatibility, only add hook once (#271)
7651f89 Add support for blesh (#267)
c2dd332 fix: get install.sh working on UbuntuWSL (#260)
84403a3 Bump reqwest from 0.11.7 to 0.11.9 (#261)
5005cf7 Bump serde_json from 1.0.73 to 1.0.75 (#262)
7fa3e1c Do not crash if the history timestamp is in the future (#250)
8d21506 use sqlite grouping rather than subquery (#181)
d36ff13 Replace dpkg with apt (#248)
* Add SearchMode fzf.
Add a new search mode "fzf" that tries to mimic the search syntax of
https://github.com/junegunn/fzf#search-syntax
This search mode splits the query into terms where each term is matched
individually. Terms can have operators like prefix, suffix, exact match
only and can be inverted. Additionally, smart-case matching is
performed: if a term contains a non-lowercase letter the match will be
case-sensitive.
* PR feedback.
- Use SearchMode::Fuzzy instead of SearchMode::Fzf
- update docs
- re-order tests so previous fuzzy tests come first, add more tests for each operator
* PR comments: remove named arguments, match expression
* PR comments: macro -> async func
* add test demonstrating problem
* add a reordered fuzzy-search mode that presents shorter matches first,
rather than using strict chronological ordering.
* fix warnings, refactor interface to minspan slightly
* Release v0.7.0
- Update all the crate versions
- Update the demo gif
- Write a changelog
- Adjust the title of the search screen (has the old name still)
- Adjust the colours of the quick-jump numbers (sadly invisible on some
colour schemes as dark grey :/)
* Update README, default config file, docs
* Link usernames
* Trigger release workflow upon release creation, as well as tags
The data part of the add history request is actually a string. I don't
want to introduce any structure here, and would rather keep it as "just
a blob". Even if that blob has structure secretly!
My fault for missing this in the last review
Also:
- Ensures that a key is generated as soon as a user registers!
- Ensures that "atuin key" will generate a key if needed, and doesn't
double base64 encode data
And a few other little fixes :)
Resolves#85Resolves#86
* Begin moving to sqlx for local too
* Stupid scanners should just have a nice cup of tea
Random internet shit searching for /.env or whatever
* Remove diesel and rusqlite fully
* Switch to Cargo workspaces
Breaking things into "client", "server" and "common" makes managing the
codebase much easier!
client - anything running on a user's machine for adding history
server - handles storing/syncing history and running a HTTP server
common - request/response API definitions, common utils, etc
* Update dockerfile