Commit Graph

1227 Commits

Author SHA1 Message Date
Ellie Huxtable
508d4f4761
History filter (#329)
* 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
2022-04-22 21:05:02 +01:00
Conrad Ludgate
02c70deecb
refactor (#327) 2022-04-22 19:24:38 +01:00
lchausmann
a9d1ece0cb
Added docker-compose.yml (#325)
Also added section to how to run your own server.

Co-authored-by: Lars Chr. Duus Hausmann <lars.chr@duus-hausmann.dk>
2022-04-22 08:41:55 +00:00
dependabot[bot]
b8bdd837eb
Bump clap from 3.1.10 to 3.1.11 (#323)
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.10 to 3.1.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.10...v3.1.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-22 09:02:11 +01:00
dependabot[bot]
52a3d0c0d8
Bump tracing from 0.1.33 to 0.1.34 (#324)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.33 to 0.1.34.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.33...tracing-0.1.34)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-22 09:01:47 +01:00
dependabot[bot]
79597b07c3
Bump clap_complete from 3.1.1 to 3.1.2 (#316)
Bumps [clap_complete](https://github.com/clap-rs/clap) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v3.1.1...clap_complete-v3.1.2)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-21 22:13:53 +01:00
Ellie Huxtable
5aca6114d4
Allow for larger commands (#321)
Followup: Limit command length client side too
2022-04-21 18:54:58 +01:00
Conrad Ludgate
9085485a4f
tracing (#315)
* enable tracing on server

* fmt

* instrument handlers
2022-04-21 18:07:33 +01:00
Brad Robel-Forrest
98d70fbf76
treat popos as ubuntu (#319) 2022-04-21 17:26:35 +01:00
Conrad Ludgate
d57f549855
refactor commands for better separation (#313)
* refactor commands for better separation

* fmt
2022-04-21 09:12:56 +00:00
Ellie Huxtable
24e2971787
Fix SQL cache query (#318)
I just deployed the older version and it was falling back on the full
count. Turns out this is because it won't upcast from INT4 to INT8
automatically, and it has to be manual

At some point the underlying total should be changed to int8, but also I
highly doubt anyone will have enough shell history to fill an int4 lol
2022-04-21 09:19:54 +01:00
Ellie Huxtable
fe05d86bfa
Fix delete trigger (#317)
I've tested this again by deleting my full history and re-syncing, all
good.
2022-04-21 09:12:51 +01:00
Conrad Ludgate
48747e3b7c
A few minor tweaks (#314)
* use bail macro

replace client database errors

remove dead code

* fix test
2022-04-21 08:05:57 +01:00
Ellie Huxtable
ed4e07d2e6
Use the count cache (#312)
* Use the count cache

By default read from the count cache - if there is no value there, then
do a full COUNT. The cache will be filled when the user posts up some
more history

* clean up server db error handling

Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2022-04-21 08:03:39 +01:00
dependabot[bot]
6e11b8e0ed
Bump clap from 3.1.9 to 3.1.10 (#309)
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-20 09:10:27 +01:00
dependabot[bot]
44e417d2fc
Bump axum from 0.5.1 to 0.5.3 (#310)
Bumps [axum](https://github.com/tokio-rs/axum) from 0.5.1 to 0.5.3.
- [Release notes](https://github.com/tokio-rs/axum/releases)
- [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/axum/compare/axum-v0.5.1...axum-v0.5.3)

---
updated-dependencies:
- dependency-name: axum
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-20 09:10:05 +01:00
Ellie Huxtable
b98a378861
Add count trigger (#308)
This can be used in a later PR to optimise our database usage
significantly. Avoiding COUNT will be fantastic for our CPU usage, and
therefore sync times.
2022-04-19 18:19:21 +01:00
dependabot[bot]
7fe523acd2
Bump sqlx from 0.5.11 to 0.5.13 (#305)
Bumps [sqlx](https://github.com/launchbadge/sqlx) from 0.5.11 to 0.5.13.
- [Release notes](https://github.com/launchbadge/sqlx/releases)
- [Changelog](https://github.com/launchbadge/sqlx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/launchbadge/sqlx/compare/v0.5.11...v0.5.13)

---
updated-dependencies:
- dependency-name: sqlx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 09:18:37 +01:00
dependabot[bot]
c5ab2a46fa
Bump clap from 3.1.8 to 3.1.9 (#306)
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.8 to 3.1.9.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.8...v3.1.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 09:17:50 +01:00
dependabot[bot]
55f66c8ad5
Bump cli-table from 0.4.6 to 0.4.7 (#297)
Bumps [cli-table](https://github.com/devashishdxt/cli-table) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/devashishdxt/cli-table/releases)
- [Commits](https://github.com/devashishdxt/cli-table/compare/0.4.6...0.4.7)

---
updated-dependencies:
- dependency-name: cli-table
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 09:16:55 +01:00
dependabot[bot]
69279d2338
Bump config from 0.13.0 to 0.13.1 (#303)
Bumps [config](https://github.com/mehcode/config-rs) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/mehcode/config-rs/releases)
- [Changelog](https://github.com/mehcode/config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mehcode/config-rs/compare/0.13.0...0.13.1)

---
updated-dependencies:
- dependency-name: config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 09:15:36 +01:00
Herby Gillot
d94cdaea3e
README: add MacPorts installation instructions (#302)
https://ports.macports.org/port/atuin/
2022-04-13 22:49:38 +00:00
Ellie Huxtable
f4240aa62b
Initial implementation of calendar API (#298)
This can be used in the future for sync so that we can be more
intelligent with what we're doing, and only sync up what's needed

I'd like to eventually replace this with something more like a merkle
tree, hence the hash field I've exposed, but that can come later

Although this does include a much larger number of count queries, it
should also be significantly more cache-able. I'll follow up with that
later, and also follow up with using this for sync :)
2022-04-13 18:29:18 +01:00
Conrad Ludgate
3c5fbc5734
provide better error messages (#300) 2022-04-13 18:08:49 +01:00
Conrad Ludgate
bc45bab273
remove default db uri (#299) 2022-04-13 18:08:21 +01:00
dependabot[bot]
4897f4a242
Bump rmp-serde from 0.15.5 to 1.0.0 (#264)
Bumps [rmp-serde](https://github.com/3Hren/msgpack-rust) from 0.15.5 to 1.0.0.
- [Release notes](https://github.com/3Hren/msgpack-rust/releases)
- [Commits](https://github.com/3Hren/msgpack-rust/commits/rmp-serde/v1.0.0)

---
updated-dependencies:
- dependency-name: rmp-serde
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 12:50:50 +01:00
dependabot[bot]
5b2e828c7f
Bump directories from 3.0.2 to 4.0.1 (#246)
Bumps [directories](https://github.com/soc/directories-rs) from 3.0.2 to 4.0.1.
- [Release notes](https://github.com/soc/directories-rs/releases)
- [Commits](https://github.com/soc/directories-rs/commits)

---
updated-dependencies:
- dependency-name: directories
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 12:50:02 +01:00
dependabot[bot]
016386ce4d
Bump urlencoding from 1.3.3 to 2.1.0 (#208)
Bumps [urlencoding](https://github.com/kornelski/rust_urlencoding) from 1.3.3 to 2.1.0.
- [Release notes](https://github.com/kornelski/rust_urlencoding/releases)
- [Commits](https://github.com/kornelski/rust_urlencoding/commits)

---
updated-dependencies:
- dependency-name: urlencoding
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 12:49:33 +01:00
Conrad Ludgate
a95018cc90
goodbye warp, hello axum (#296) 2022-04-12 23:06:19 +01:00
Conrad Ludgate
3b7ed7caff
fix env config parsing (#295)
* fix env config parsing

* fmt
2022-04-12 21:47:07 +01:00
Ellie Huxtable
ac0d29f6dc
Release v0.8.1 (#291)
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)
2022-04-12 09:32:19 +01:00
Jamie Quigley
f861893293
Update to clap 3.1.x (#289) 2022-04-07 06:32:11 +01:00
Jakob Schrettenbrunner
e8f7aaccef
Add compact mode (#288) 2022-04-04 20:59:01 -07:00
Jakob Schrettenbrunner
1e04c4c079
Add rust-version to Cargo.toml (#287) 2022-04-04 14:22:56 -07:00
Ellie Huxtable
222e52be3d
Update Dockerfile 2022-03-18 19:28:55 +00:00
Patrick
fae118a46b
Improve fuzzy search (#279)
* 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
2022-03-18 11:37:27 +00:00
Ellie Huxtable
7cde55a751
Add code of conduct (#281) 2022-03-17 21:43:54 +00:00
Ellie Huxtable
d270798277
Update config-rs (#280)
* Update config-rs

Also fix our call to current_dir

This should resolve #195

Thanks @conradludgate for the upstream fix!

* Format
2022-03-17 21:26:57 +00:00
Ellie Huxtable
32488830b8
Update README.md 2022-03-17 21:21:27 +00:00
Lucas Burns
7f587418da
Fix history list --cwd errors (#278) 2022-03-13 19:53:49 +00:00
Patrick Jackson
e117b622fe
Update fish bindings. (#265) 2022-02-15 23:21:28 +00:00
Sandro
4223ac6943
Restore bash 4.2 compatibility, only add hook once (#271) 2022-02-15 22:54:25 +00:00
Sandro
7651f89261
Add support for blesh (#267)
* Fix intendation

* Add support for blesh

See https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A71-Introduction#user-content-fn-blehook for more details
2022-01-25 18:33:25 +00:00
Simon Elsbrock
c2dd3322c4
fix: get install.sh working on UbuntuWSL (#260) 2022-01-18 23:07:57 +00:00
dependabot[bot]
84403a3aef
Bump reqwest from 0.11.7 to 0.11.9 (#261)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.7 to 0.11.9.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.7...v0.11.9)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-18 23:01:31 +00:00
dependabot[bot]
5005cf70c3
Bump serde_json from 1.0.73 to 1.0.75 (#262)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.73 to 1.0.75.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.75)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-18 23:01:09 +00:00
Ellie
7fa3e1c0f4
Do not crash if the history timestamp is in the future (#250)
Resolve #189

We were throwing an OutOfRangeError. This occurs when you attempt to
convert to a duration, and your input is <0. A value in the future would
have done this. This is especially noticeable during DST...
2021-12-20 05:52:07 +00:00
Mark Wotton
8d215060a1
use sqlite grouping rather than subquery (#181) 2021-12-19 10:29:01 +00:00
Sandro
d36ff138ab
Replace dpkg with apt (#248)
dpkg is a backend tool not supposed to be used by end users for installing debs.
Also apt installs potentials dependencies.
2021-12-19 10:13:13 +00:00
Ellie
88b2651ba4
Release 0.8.0 (#245) 2021-12-17 19:00:08 +00:00