Commit Graph

47 Commits

Author SHA1 Message Date
Ellie Huxtable
41eed3f6a1
Release v11 (#529) 2022-09-13 19:03:52 +00:00
Conrad Ludgate
702a644f68
better cursor search (#473)
* improve cursor code

* proper unicode support

* refactor and test

* fmt

* clippy

* move methods to state

* refactor search modules
2022-09-11 16:24:16 +01:00
Jerome Ducret
6127642d30
Securize Dockerfile (#506) 2022-08-21 21:06:14 +00:00
Martin Indra
2abac5d853
Trim whitespace from end of encryption key (#496) 2022-08-11 12:27:04 +01:00
Frank Hamand
ab994e3c82
Batch key handling (#448)
* 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
2022-06-13 09:33:05 +01:00
noyez
3c2b055039
Noyez fix dir hostname utf8 (#430)
* Allow zsh_histdb import diretories and hostnames as utf-8

* Allow zsh_histdb import diretories and hostnames as utf-8

Co-authored-by: Bradley Noyes <b@noyes.dev>
2022-06-05 21:35:46 +01:00
noyez
e5df809dd2
Noyez zsh histdb import (#393)
* 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>
2022-05-20 07:36:53 +01:00
Conrad Ludgate
1d030b9d32
Importer V3 (#395)
* start of importer refactor

* fish

* resh

* zsh
2022-05-09 07:46:52 +01:00
Jakub Panek
93ab4e7842
ignore JetBrains IDEs, tidy-up imports (#348)
* ignore JB IDEs

* tidy-up imports

* add rustfmt config
2022-04-28 18:53:59 +01:00
Conrad Ludgate
d8ef5dd93a
fix db range query (#351) 2022-04-26 18:03:13 +01:00
Conrad Ludgate
7f5310a1aa
history list (#340) 2022-04-25 07:13:30 +01:00
Conrad Ludgate
eab1dbf414
sql builder (#333)
* start

* clean up

* refactor globs
2022-04-23 18:34:41 +01:00
Ellie Huxtable
b22929222f
Fix empty queries with filters (#332) 2022-04-22 21:15:50 +00:00
Conrad Ludgate
7436e4ff65
feature-flags (#328)
* use feature flags

* fmt

* fix features

* update ci

* fmt

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2022-04-22 20:14:23 +00:00
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
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
Conrad Ludgate
3c5fbc5734
provide better error messages (#300) 2022-04-13 18:08:49 +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
Jakob Schrettenbrunner
e8f7aaccef
Add compact mode (#288) 2022-04-04 20:59:01 -07: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
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
Lucas Burns
7f587418da
Fix history list --cwd errors (#278) 2022-03-13 19:53:49 +00:00
Mark Wotton
8d215060a1
use sqlite grouping rather than subquery (#181) 2021-12-19 10:29:01 +00:00
Conrad Ludgate
87df7d80ec
Fish importing (#234)
* make a start on fish

* fix

* test

* enable fish

* fmt

* update histpath

set up fish init script

* update readme

* cover edge case

* fmt

* fix session variables

Co-authored-by: PJ <me@panekj.dev>

* respect NOBIND

Co-authored-by: PJ <me@panekj.dev>

* fix env var setting

Co-authored-by: PJ <me@panekj.dev>

* fix whitespace

Co-authored-by: PJ <me@panekj.dev>

* add fish to supported shells

Co-authored-by: PJ <me@panekj.dev>
2021-12-11 09:48:53 +00:00
Conrad Ludgate
4bdf4c40c2
feat: login/register no longer blocking (#216) 2021-12-08 13:37:49 +00:00
Conrad Ludgate
f539f60ae4
chore: add more eyre contexts (#200)
* chore: add more eyre contexts

* chore: rustfmt
2021-11-17 11:50:34 +00:00
Conrad Ludgate
8f91b1410c
chore: some new linting (#201)
* chore: some new linting

* chore: some more linting

* chore: rustfmt
2021-11-13 22:40:24 +00:00
Mark Wotton
2024884f49
Reordered fuzzy search (#179)
* 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
2021-09-09 11:46:46 +01:00
Frank Hamand
0b9dc6696b
Add fuzzy text search mode (#142) 2021-06-01 08:38:19 +01:00
Ellie Huxtable
c16a26cdbf
Fix sync (#95)
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
2021-05-09 22:31:11 +01:00
Conrad Ludgate
de2e34ac50
some changes 🤷 (#83)
* make everything a cow

* fmt + clippy
2021-05-09 21:17:24 +01:00
Ellie Huxtable
e43e5ce74a
Add logout, only login if not already logged in (#91)
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 #85
Resolves #86
2021-05-09 20:11:17 +01:00
Jamie Quigley
af707ac5a4
Fix resh importer crashing on end of file (#92) 2021-05-09 19:09:09 +00:00
Conrad Ludgate
4b9ff801a6
fix some bugs (#90)
* fix some bugs

* format
2021-05-09 19:12:41 +01:00
Conrad Ludgate
090120a834
Generic Importer Trait (#71)
* initial importer trait

* appease linters

* improve file handling. fixes #66

* use size hint

* format + comment

* update serde rename mess

* tested 😎 🚀

* small formatting
2021-05-09 18:34:15 +01:00
Jamie Quigley
725ea9b16b
Fix resh importer, and change error handling method (#82) 2021-05-09 15:20:39 +01:00
Yuvi Panda
a04865d9d8
Use an enum for dialect (#80) 2021-05-09 11:39:39 +01:00
Yuvi Panda
19bd00f620
Support fulltext search of commands (#75) 2021-05-09 08:33:56 +01:00
Jamie Quigley
bb086808b1
Add importer for resh_history file (#69)
* Added resh history importer

* Silence trivial clippy warnings for the PR CI
2021-05-08 17:29:46 +01:00
Ellie Huxtable
0610ae197f
Pre release polishing (#42)
* Improve readme

* Add demo gif

* Update readme

* Add mac build

* Amend release config

* Update gif
2021-04-26 13:25:57 +00:00
Ellie Huxtable
7b5c3d543d Support bash, resolves #3 2021-04-26 11:57:30 +01:00
Ellie Huxtable
4f16e8411e Revert to storing history as nanos 2021-04-25 21:27:51 +01:00
Ellie Huxtable
156893d774
Update docs, unify on SQLx, bugfixes (#40)
* 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
2021-04-25 17:21:52 +00:00
Ellie Huxtable
4a50ce3666 Bugfixes, show time ago, perf improvements
Also allow unique listing and more ergonomic cwd usage
2021-04-21 21:26:44 +01:00
Ellie Huxtable
a21737e2b7
Use cargo workspaces (#37)
* 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
2021-04-20 20:53:07 +00:00