Commit Graph

143 Commits

Author SHA1 Message Date
Ellie Huxtable
d2240e1163
Allow server configured page size (#994)
* Allow server configured page size

* Backwards compat via semver checks

* Correct header name
2023-05-21 15:21:51 +00:00
Ellie Huxtable
ca263834e9
Restructure account commands to account subcommand (#984)
* 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
2023-05-17 21:28:37 +01:00
Yannick Ulrich
7b9dea72e3
feat: add delete account option (attempt 2) (#980)
* Added DELETE register endpoint

* Added remove function to database

* Added unregister to client

* Updated docs

* Renamed functions

* Reformatting

* Used execute instead of fetch in delete_user
2023-05-16 22:00:59 +01:00
Ellie Huxtable
b53ca357cd
Fix key regression introduced (#974) 2023-05-11 20:18:20 +00:00
Ellie Huxtable
bf7432f392
Patch bash history import regression (#970)
* 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.
2023-05-10 13:02:35 +00:00
Kjetil Jørgensen
244a501cbb
cwd_filter: much like history_filter, only it applies to cwd (#904)
* cwd_filter: much like history_filter, only it applies to cwd

* appease clippy
2023-05-02 02:55:54 +00:00
Conrad Ludgate
c7d89c1703
chore: uuhhhhhh crypto lol (#805)
* chore: uuhhhhhh crypto lol

* remove dead code

* fix key decoding

* use inplace encryption
2023-04-17 21:12:02 +01:00
Ellie Huxtable
7c079070c5
Release v14.0.1 (#883) 2023-04-16 11:25:48 +00:00
postmath
64671a17c1
Improve error message for issue #850. (#876)
* Improve error message for issue #850.

* Applied cargo fmt, doh.
2023-04-14 19:48:45 +00:00
Vladislav Stepanov
c05d285042
Workspace reorder (#868)
* 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.
2023-04-14 20:18:58 +01:00
Ellie Huxtable
03dd3ddf8b
Switch to uuidv7 (#864)
* Add uuid_v7

* Actually use the new uuid

* Add a test to ensure all uuids are unique, even in a tight loop

* Make clippy happy
2023-04-11 16:26:16 +01:00
Tom Cammann
e149a0a6e9
Add --reverse to atuin search (#862)
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
```
2023-04-11 09:39:23 +01:00
János Illés
04044c4146
Use XDG data directory for fish import (#851)
* 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>
2023-04-08 10:53:32 +01:00
cyqsimon
188117dfae
Handle empty lines when importing from Bash (#845)
* Handle empty lines

* Fix insufficient accuracy in timestamp tests

* Use nanoseconds
2023-04-05 09:37:27 +01:00
cyqsimon
6671f72d1b
Updated client config docs (#839)
* 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
2023-04-05 09:32:26 +01:00
Ellie Huxtable
400544738b
Fix deleting history that doesn't exist yet (#844)
This can occur if history has been added + then deleted on a machine
before it has a chance to be synced to a new one.
2023-04-05 09:23:09 +01:00
Ellie Huxtable
4e4fdb9f8e
Release Atuin v14 (#836)
* Bump versions

* Write release notes

* add link
2023-04-01 18:17:38 +01:00
Tom Cammann
fa0a1447a6
Add --offset flag to atuin search (#825)
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
```
2023-03-29 09:27:14 +01:00
jean-santos
caf2ddfb9f
client filtering done in query (#629) 2023-03-27 22:33:04 +01:00
Conrad Ludgate
bb7f00dbef
chore: use fork of skim (#803)
* use fuzzy-matcher instead of skim

switch to a search-engine abstraction

* fmt

* fix deprecated warnings
2023-03-26 15:47:38 +01:00
Steven Xu
a7cb21a51b
feat: add *Nushell* support (#788)
* 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
2023-03-26 15:44:06 +01:00
Patrick Decat
13ce5f746c
feat: add an inline view mode (#648)
* add inline viewport

* Add inline_height setting. Zero disables inline mode (the default)
2023-03-25 17:27:20 +00:00
Ellie Huxtable
79622cf698
Delete all instances of a command (#797)
* 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
2023-03-24 09:04:57 +00:00
Krut Patel
378be6b790
Allow changing search_mode during interactive search (#586)
* 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
2023-03-22 16:16:59 +00:00
Ellie Huxtable
bc06d5f36f
Fix skim search (#795) 2023-03-21 20:00:19 +00:00
Ellie Huxtable
13514b635c
Support old msgpack (#794)
* 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>
2023-03-20 21:26:37 +00:00
Ellie Huxtable
dcd77749dd
Add history deletion (#791)
* 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
2023-03-20 09:26:54 +00:00
Conrad Ludgate
edcd477153
skim-demo (#695)
* 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>
2023-03-19 20:49:57 +00:00
Patrick Decat
efd2230eba
Prefer PWD environment variable over cwd if available to better support symbolic links (#783) 2023-03-14 23:15:39 +00:00
Ellie Huxtable
991461f423
Allow specifying fulltext as well as full-text (#771) 2023-03-09 09:13:31 +00:00
Ellie Huxtable
b91d4f4806
Fix before/after combined with limit (#770)
* 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
2023-03-08 23:45:14 +00:00
Luke Karrys
ca5bbea0d4
fix(client): always read session_path from settings (#757)
* fix(client): always read session_path from settings

* fixup! fix(client): always read session_path from settings

* fixup! fix(client): always read session_path from settings
2023-03-06 22:46:03 +00:00
Steven Xu
2e79e73af3
feat: add common default keybindings (#719)
* 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
2023-03-05 18:49:09 +00:00
Ellie Huxtable
3eb50a8383
Up arrow filter_mode setting default to global filter mode (#758)
Resolves #756
2023-03-05 18:43:03 +00:00
Patrick Decat
24388033a5
Show preview of selected command (#643)
* 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>
2023-03-05 18:36:35 +00:00
cyqsimon
63c572104b
Rework Bash import (#747)
* 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
2023-03-02 10:05:19 +00:00
Ellie Huxtable
e4fde80acc
Patch release v13.0.1 (#741)
* Patch release v13.0.1

* Update blog post
2023-02-28 21:44:39 +00:00
Ellie Huxtable
fe5f728aa6
Release v13 (#727)
* Write release blog post

* Bump versions

* Update contributors
2023-02-26 21:22:29 +00:00
Johannes Baiter
5cb43772dc
Add history_filter cfg to exclude commands from history (#515) (#716)
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.
2023-02-14 07:14:05 +00:00
Conrad Ludgate
edda1b741a
crossterm support (#331)
* crossterm v2

* patch crossterm

* fix-version

* no more tui dependency

* lints
2023-02-10 17:25:43 +00:00
dependabot[bot]
ec24437735
Bump fs-err from 2.8.1 to 2.9.0 (#604)
Bumps [fs-err](https://github.com/andrewhickman/fs-err) from 2.8.1 to 2.9.0.
- [Release notes](https://github.com/andrewhickman/fs-err/releases)
- [Changelog](https://github.com/andrewhickman/fs-err/blob/main/CHANGELOG.md)
- [Commits](https://github.com/andrewhickman/fs-err/compare/2.8.1...2.9.0)

---
updated-dependencies:
- dependency-name: fs-err
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 09:34:50 +00:00
Evan Purkhiser
6ae2abf09f
Remove whitespace in template client config.tom (#697) 2023-02-07 09:10:57 +00:00
Conrad Ludgate
5611bc59f5
display mnemonic key (#694) 2023-02-06 19:22:58 +00:00
Ellie Huxtable
3abc96fafe
Try to make clippy happy 🥺 (#686)
* Try to make clippy happy 🥺

* Fmt

* I missed one (can't run clippy locally on airport wifi...)
2023-02-06 11:59:01 +00:00
Jamie Quigley
b01d9f81b0
Improve error message when $AUTIN_SESSION is not set. (#654)
Closes #653
2022-12-27 12:44:00 +00:00
Patrick Decat
ed394afa82
Allow overriding filter and search modes from CLI (#635)
* 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>
2022-12-18 18:26:09 +00:00
dependabot[bot]
d1e29cbcae
Bump base64 from 0.13.0 to 0.20.0 (#641)
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.13.0 to 0.20.0.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.13.0...v0.20.0)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-18 17:53:36 +00:00
Ellie Huxtable
4c6a287f4d
Switch to using ATUIN_LOG instead of RUST_LOG (#642)
* Switch to using ATUIN_LOG instead of RUST_LOG

* Stop clippy complaining

* I should know better - clippy is never happy :(
2022-12-16 18:37:45 +00:00
Ellie Huxtable
f38ef12581
Release v12 (#599)
* Release v12

* Add new contributors
2022-11-06 15:30:21 +00:00
Sam Lanning
4768b16b74
Add setting for keeping typed query when exiting (#451)
* Add option for keeping typed query on escape

fixes #422

* chore: Address duplicate if statement blocks
2022-11-06 07:34:14 +00:00