Commit graph

82 commits

Author SHA1 Message Date
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
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
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
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
Mat Jones
133971179e
Add Alt+backspace and Ctrl+u keybinds for deleting by word and by line, respectively (#243)
* remove unused environment var loading entire history into an env var

* Add Alt+backspace and Ctrl+u keybinds for deleting by word and by line, respectively
2021-12-17 12:14:45 +00:00
Mat Jones
059e858a00
remove unused environment var loading entire history into an env var (#242) 2021-12-16 19:45:05 +00:00
Orhun Parmaksız
079d8037ab
Enable help messages for command line arguments (#239) 2021-12-11 22:29:47 +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
Orhun Parmaksız
0abd063e01
Support generating shell completions (#235)
* Add gen-completions subcommand for generating shell completions

* Update documentation about generating shell completions

* Include the shell completions in release tarball
2021-12-10 23:59:39 +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
Jannik
27d3d81afe
feat: allow input of credentials from stdin (#185)
* feat: allow credential input from stdin for registration

This changes the options for register to be optional. If arguments are
not given, the program will ask for them interactively.

* feat: allow credential input from stdin for login

* style: apply cargo fmt
2021-09-24 16:24:59 +00:00
Jannik
446ffb88c7
Resolve clippy warnings (#187)
* refactor: nest or patterns

* refactor: fix clippy lint names

* refactor: remove unnecessary wraps

* style: apply cargo fmt
2021-09-24 16:03:37 +00:00
Ellie Huxtable
f55d5cf0bf
Ignore commands beginning with a space, resolve #114 (#123) 2021-05-14 08:31:29 +01:00
Ian Smith
a127408e93
run shellcheck (#97)
* run shellcheck

* Update .github/workflows/shellcheck.yml

Co-authored-by: Conrad Ludgate <oon@conradludgate.com>

* shellcheck fixes in which i am highly confident

* shellcheck fixes in which I am less confident - not executing this is fine, right?

* SC2155

In src/shell/atuin.bash line 1:
export ATUIN_SESSION=$(atuin uuid)
       ^-----------^ SC2155: Declare and assign separately to avoid masking return values.

* shellcheck doesn't support zsh, per https://github.com/koalaman/shellcheck/wiki/SC1071

* yaml fix

* gotta checkout our code, too

* yaml fix

* action spelling

* exclude .zsh

* Shellcheck doesn't support zsh, per

https://github.com/koalaman/shellcheck/wiki/SC1071, and the ignore: param
in ludeeus/action-shellcheck only supports _directories_, not _files_.
So instead, we manually add any error the shellcheck step finds in the
file to the above line ...

* comment all the ignores

* Update src/shell/atuin.bash

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>

* new zsh plugin shellcheck errors

* new zsh plugin shellcheck errors, pt 2

Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2021-05-14 08:31:15 +01:00
Ellie Huxtable
d3059af815
Release v0.7.0 (#103)
* 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
2021-05-10 21:28:07 +01:00
Yuvi Panda
c02934d184
Implement 'quick access' via Alt-<n> (#79)
* Implement 'quick access' via numbers

Puts numbers 0-9 next to commands *above* current selection.
Ctrl-<number> should activate them - but since Ctrl-<num> are
reserved by terminal, this does not currently work. Need to
find different sets of keyboard shortcuts.

Numbers are *above* current selection, since the user must use
the arrow keys to go over the commands below current selection
before reaching selection.

* Use Alt+<n> to select last nth command

* Don't print Opt+0

Same as <Enter>

* Run rustfmt

* Simplify code

- Use ? operator for getting selected item
- Use RangeInclusive to check if character pressed is a number
2021-05-10 12:55:29 +01:00
Yuvi Panda
f0463326fa
Use format! instead of string concat (#94)
Cleaner
2021-05-09 22:33:57 +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
Will Fancher
623df9064e
Add Emacs style ctrl-g, ctrl-n, and ctrl-p (#77) 2021-05-09 18:43:55 +00:00
Conrad Ludgate
4b9ff801a6
fix some bugs (#90)
* fix some bugs

* format
2021-05-09 19:12:41 +01:00
Ellie Huxtable
bd4db1fa03
Allow listing or searching with only the command as output (#89)
Should be useful for using other tools, such as FZF
2021-05-09 18:01:21 +00:00
Ellie Huxtable
d39e3cb479
Fix bash integration to set the session (#88) 2021-05-09 18:47: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
c69f6ee3f9
Run shellcheck on bash file (#81)
Ref #64
2021-05-09 13:12:09 +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
Ellie Huxtable
07c5461013
Retain the query entered into the TUI (#76)
If no results are found, and the user presses enter, keep the query!

Resolves #73
2021-05-08 22:10:40 +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
Jamie Quigley
2e5f16a6a3
Add Ctrl-d as a way of exiting the TUI (#65) 2021-05-08 14:04:33 +00:00
Ellie Huxtable
8bd4d12cfa
Add ATUIN_NOBIND (#62)
* Add ATUIN_NOBIND

* Update docs/key-binding.md

`<kbd>`, what magic

Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>

Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
2021-05-08 14:17:22 +01:00
Ellie Huxtable
99f26ff383
Allow using Ctrl-c to exit (#53) 2021-05-08 00:02:39 +01:00
Ellie Huxtable
4df77c5201 Release v0.6.4
- Fix version
- Only build for two targets
2021-04-26 18:36:19 +01:00
Ellie Huxtable
646fec893e Fix pipeline
Lol no more committing to main for me
2021-04-26 12:05:20 +01:00
Ellie Huxtable
7b5c3d543d Support bash, resolves #3 2021-04-26 11:57:30 +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
Ellie Huxtable
34888827f8
Switch to Warp + SQLx, use async, switch to Rust stable (#36)
* Switch to warp + sql, use async and stable rust

* Update CI to use stable
2021-04-20 16:07:11 +00:00
Ellie Huxtable
f6de558070
Optimise docker (#34)
* Smaller dockerfile, better error handling

* Add config dir
2021-04-14 17:40:50 +00:00
Ellie Huxtable
9c8d426184
Add dockerfile (#32) 2021-04-13 21:31:41 +00:00
Ellie Huxtable
5751463942
Add history sync, resolves #13 (#31)
* Add encryption

* Add login and register command

* Add count endpoint

* Write initial sync push

* Add single sync command

Confirmed working for one client only

* Automatically sync on a configurable frequency

* Add key command, key arg to login

* Only load session if it exists

* Use sync and history timestamps for download

* Bind other key code

Seems like some systems have this code for up arrow? I'm not sure why,
and it's not an easy one to google.

* Simplify upload

* Try and fix download sync loop

* Change sync order to avoid uploading what we just downloaded

* Multiline import fix

* Fix time parsing

* Fix importing history with no time

* Add hostname to sync

* Use hostname to filter sync

* Fixes

* Add binding

* Stuff from yesterday

* Set cursor modes

* Make clippy happy

* Bump version
2021-04-13 19:14:07 +01:00
Ellie Huxtable
9f16f76bd8 Update config 2021-04-09 12:40:21 +01:00