Commit graph

99 commits

Author SHA1 Message Date
Jakub Jirutka
ab294cde34
Don't pollute shell environment - remove 'id' variable (#408) 2022-05-16 22:13:17 +01:00
Jakub Jirutka
14b30606a5
Allow to build atuin server without client (#404) 2022-05-13 06:57:27 +01:00
Conrad Ludgate
1d030b9d32
Importer V3 (#395)
* start of importer refactor

* fish

* resh

* zsh
2022-05-09 07:46:52 +01:00
Luke Baker
e9d2ec4bf7
Add ctrl-k and ctrl-j for up and down (#394) 2022-05-08 09:03:00 +01:00
Satyarth Sampath
4a839dab44
Adds stats summary (#384)
* stat command parsing is handled without subcommands

* Updates match clause based on PR review

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

* updates value returned by match based on PR review

* adds vscode to gitignore

* use an if statement instead of match

Co-authored-by: Satyarth <satyarth.sampath@gojek.com>
Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
2022-05-03 15:49:27 +01:00
Jakob-Niklas See
9d2e9ea174
Search: Allow specifiying the limited of returned entries (#364)
This patch adds a new option to the search command, allowing to limit
the returned results from the database.
2022-04-28 18:54:16 +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
jean-santos
5926ea64bf
fix import auto for bash (#352) 2022-04-26 17:56:06 +01:00
Conrad Ludgate
7f5310a1aa
history list (#340) 2022-04-25 07:13:30 +01: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
9085485a4f
tracing (#315)
* enable tracing on server

* fmt

* instrument handlers
2022-04-21 18:07:33 +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
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
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