Commit graph

197 commits

Author SHA1 Message Date
依云
58e307bc6d
fix: refuse "--dupkeep 0" (#2807)
Some checks failed
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Nix / build-test (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / build (ubuntu-latest) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / integration-test (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
build-docker / publish_manifest (push) Has been cancelled
People may think it would keep only one copy, but it didn't work that way.
2025-07-03 16:35:18 +01:00
Scotte Zinn
7f868711f0
feat: Add sqlite server support for self-hosting (#2770)
* Move db_uri setting to DbSettings

* WIP: sqlite crate framework

* WIP: Migrations

* WIP: sqlite implementation

* Add sqlite3 to Docker image

* verified_at needed for user query

* chore(deps): bump debian (#2772)

Bumps debian from bookworm-20250428-slim to bookworm-20250520-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-version: bookworm-20250520-slim
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(doctor): mention the required ble.sh version (#2774)

References:

https://forum.atuin.sh/t/1047

* fix: Don't print errors in `zsh_autosuggest` helper (#2780)

Previously, this would result in long multi-line errors when typing,
making it hard to see the shell prompt:
```
$  Error: could not load client settings

Caused by:
   0: could not create config file
   1: failed to create file `/home/jyn/.config/atuin/config.toml`
   2: Required key not available (os error 126)

Location:
    atuin-client/src/settings.rs:675:54
 fError: could not load client settings

Caused by:
   0: could not create config file
   1: failed to create file `/home/jyn/.config/atuin/config.toml`
   2: Required key not available (os error 126)

Location:
    atuin-client/src/settings.rs:675:54
 faError: could not load client settings
```

Silence these in autosuggestions, such that they only show up when
explicitly invoking atuin.

* fix: `atuin.nu` enchancements (#2778)

* PR feedback

* Remove sqlite3 package

* fix(search): prevent panic on malformed format strings (#2776) (#2777)

* fix(search): prevent panic on malformed format strings (#2776)

- Wrap format operations in panic catcher for graceful error handling
- Improve error messages with context-aware guidance for common issues
- Let runtime-format parser handle validation to avoid blocking valid formats

Fixes crash when using malformed format strings by catching formatting
errors gracefully and providing actionable guidance without restricting
legitimate format patterns like {command} or {time}.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Satisfy cargo fmt

* test(search): add regression tests for format string panic (#2776)

- Add test for malformed JSON format strings that previously caused panics
- Add test to ensure valid format strings continue to work
- Prevent future regressions of the format string panic issue

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
Co-authored-by: jyn <github@jyn.dev>
Co-authored-by: Tyarel8 <98483313+Tyarel8@users.noreply.github.com>
Co-authored-by: Brian Cosgrove <cosgroveb@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-06-23 12:31:55 +01:00
Brian Cosgrove
306f5e1104
fix(search): prevent panic on malformed format strings (#2776) (#2777)
Some checks failed
Codespell / Check for spelling errors (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
Rust / build (ubuntu-latest) (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Nix / build-test (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / integration-test (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
build-docker / publish_manifest (push) Has been cancelled
* fix(search): prevent panic on malformed format strings (#2776)

- Wrap format operations in panic catcher for graceful error handling
- Improve error messages with context-aware guidance for common issues
- Let runtime-format parser handle validation to avoid blocking valid formats

Fixes crash when using malformed format strings by catching formatting
errors gracefully and providing actionable guidance without restricting
legitimate format patterns like {command} or {time}.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Satisfy cargo fmt

* test(search): add regression tests for format string panic (#2776)

- Add test for malformed JSON format strings that previously caused panics
- Add test to ensure valid format strings continue to work
- Prevent future regressions of the format string panic issue

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-11 19:12:20 +01:00
Tyarel8
2e26f34687
fix: atuin.nu enchancements (#2778)
Some checks failed
Codespell / Check for spelling errors (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Nix / build-test (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / build (ubuntu-latest) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / integration-test (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
build-docker / publish_manifest (push) Has been cancelled
2025-06-05 13:28:41 +01:00
jyn
2814c2031c
fix: Don't print errors in zsh_autosuggest helper (#2780)
Previously, this would result in long multi-line errors when typing,
making it hard to see the shell prompt:
```
$  Error: could not load client settings

Caused by:
   0: could not create config file
   1: failed to create file `/home/jyn/.config/atuin/config.toml`
   2: Required key not available (os error 126)

Location:
    atuin-client/src/settings.rs:675:54
 fError: could not load client settings

Caused by:
   0: could not create config file
   1: failed to create file `/home/jyn/.config/atuin/config.toml`
   2: Required key not available (os error 126)

Location:
    atuin-client/src/settings.rs:675:54
 faError: could not load client settings
```

Silence these in autosuggestions, such that they only show up when
explicitly invoking atuin.
2025-06-05 13:26:37 +01:00
Koichi Murase
239e6fbe7c
fix(doctor): mention the required ble.sh version (#2774)
Some checks failed
build-docker / publish_manifest (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Nix / build-test (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / build (ubuntu-latest) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / integration-test (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
References:

https://forum.atuin.sh/t/1047
2025-05-27 15:30:54 +01:00
Michelle Tilley
87a963600c
fix(api): Allow trailing slashes in sync_address (#2760)
Some checks failed
Rust / integration-test (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Nix / build-test (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / build (ubuntu-latest) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
build-docker / publish_manifest (push) Has been cancelled
2025-05-21 17:36:23 -07:00
Michelle Tilley
f8145e6709
Formatting
Some checks failed
Rust / build (ubuntu-latest) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Nix / build-test (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / integration-test (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
build-docker / publish_manifest (push) Has been cancelled
2025-05-14 20:34:13 -07:00
Corey Kosak
593702c91c
fix: clarify that HISTFILE, if used, must be exported (#2758) 2025-05-14 20:29:07 -07:00
Michelle Tilley
c93991b5d0
chore: Allow setting script DB path (#2750)
Some checks failed
Codespell / Check for spelling errors (push) Has been cancelled
Nix / build-test (push) Has been cancelled
build-docker / publish_x86 (push) Has been cancelled
build-docker / publish_aarch64 (push) Has been cancelled
Install / install (macos-14) (push) Has been cancelled
Install / install (ubuntu-latest) (push) Has been cancelled
Nix / check (push) Has been cancelled
Rust / build (macos-14) (push) Has been cancelled
Rust / build (ubuntu-latest) (push) Has been cancelled
Rust / cross-compile (x86_64-unknown-illumos) (push) Has been cancelled
Rust / unit-test (macos-14) (push) Has been cancelled
Rust / unit-test (ubuntu-latest) (push) Has been cancelled
Rust / check (macos-14) (push) Has been cancelled
Rust / check (ubuntu-latest) (push) Has been cancelled
Rust / integration-test (push) Has been cancelled
Rust / clippy (push) Has been cancelled
Rust / format (push) Has been cancelled
Shellcheck / shellcheck (push) Has been cancelled
build-docker / publish_manifest (push) Has been cancelled
* chore: Allow setting script DB path

* Rename scripts.database_path setting to scripts.db_path to match other crates
2025-05-13 08:29:04 -07:00
Ellie Huxtable
84589cab15
chore(release): prepare for release 18.6.1 (#2749) 2025-05-08 14:10:38 -07:00
Ellie Huxtable
f49599599e
Revert "fix: selection vs render issue (#2706)" (#2748)
This reverts commit cd5d337b52.
2025-05-08 14:04:01 -07:00
Ellie Huxtable
45460d4c31
chore(release): prepare for release 18.6.0 (#2740)
Co-authored-by: Ellie Huxtable <ellie@mac.lan>
2025-05-06 16:18:21 -07:00
Michelle Tilley
a1433e0cef
feat: Implement KV as a write-through cache (#2732) 2025-05-06 08:36:32 -07:00
Mark Wotton
d5c3558b71
chore(deps): update minspan to 0.1.5 (#2729)
* update minspan to 0.1.3

had a correctness bug reported to 0.1.1, should probably update.

* Update Cargo.toml

* add Cargo.lock changes
2025-05-06 08:29:52 -07:00
Cristian Le
100de6e463
chore(deps): Update postmark to 0.11 (#2730) 2025-05-01 15:18:21 +01:00
Ellie Huxtable
cd5d337b52
fix: selection vs render issue (#2706)
* fix: selection vs render issue

* render on continue too

* clippy

* fmt
2025-04-28 15:25:37 +01:00
printfn
dc7082d681
feat: sort atuin store status output (#2719)
Co-authored-by: printfn <printfn@users.noreply.github.com>
2025-04-28 15:17:13 +01:00
dependabot[bot]
881f622ce3
chore(deps): bump unicode-width from 0.1.14 to 0.2.0 (#2722)
Bumps [unicode-width](https://github.com/unicode-rs/unicode-width) from 0.1.14 to 0.2.0.
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.14...v0.2.0)

---
updated-dependencies:
- dependency-name: unicode-width
  dependency-version: 0.2.0
  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>
2025-04-28 15:16:43 +01:00
Ellie Huxtable
10df8ff8d1
chore(release): prepare for release 18.6.0-beta.1 (#2723) 2025-04-28 14:32:07 +01:00
Ellie Huxtable
cab77ffc64
Revert "feat(zsh): try to go to the position in zsh's history (#1469)" (#2715)
This reverts commit 264da9e4e9.
2025-04-28 13:56:39 +01:00
Alex Hamilton
5cd23537b0
feat(stats): add jj to default common subcommands (#2708) 2025-04-21 08:04:26 -07:00
Kian-Meng Ang
07655e92b1
chore: fix typos (#2668)
Found via `typos --hidden --format brief`
2025-04-17 23:22:54 +01:00
依云
d016e2c9be
feat: delete duplicate history (#2697) 2025-04-17 23:21:25 +01:00
Cristian Le
28ddb45e01
Update dependencies (#2695)
- Bump protox to 0.8
- Bump interim to 0.2
2025-04-16 12:25:39 +01:00
Ellie Huxtable
09fc76ed82
chore(release): prepare for release 18.5.0 (#2685)
* chore(release): prepare for release 18.5.0

* update workflow ubuntu version

* revert because dist checks lol
2025-04-08 17:05:12 +01:00
Michelle Tilley
a62d27c5f1
feat: Add 'atuin scripts rm' and 'atuin scripts ls' aliases; allow reading from stdin (#2680)
* Add 'atuin scripts rm' and 'atuin scripts ls' aliases

* Allow creating new scripts from stdin
2025-04-08 14:47:15 +01:00
Ellie Huxtable
1f6031d84a
chore(release): prepare for release 18.5.0-beta.3 (#2678) 2025-04-07 14:33:24 +01:00
Ellie Huxtable
f162d641a7
feat: support storing, syncing and executing scripts (#2644)
* feat: add atuin-scripts crate

* initial

* define record types

* wip

* wip

* mvp

* add show command, make stdin work

* rewrite execution to use shebang and script file ALWAYS

* rename show -> get, allow fetching script only

* fmt

* clippy

* a bunch of fixes to the edits

* update lock

* variables

* fmt

* clippy

* pr feedback

* fmt
2025-04-07 14:17:19 +01:00
Ellie Huxtable
2935a5a6bd
fix: fish up binding bug (#2677)
Closes: #2672

I think this was introduced in #2616 - typing the literally characters
`u p` lead to opening the TUI, as we were still executing the fish 4
bindings.
2025-04-07 14:15:14 +01:00
Ellie Huxtable
336447e7f6
Revert "Revert "chore: update to rust 1.86 (#2666)" (#2667)" (#2676)
This reverts commit 9d816d16db.
2025-04-07 13:04:18 +01:00
依云
405a94d948
fix(zsh): avoid calling user-defined widgets when searching for history position (#2670)
Or those widgets may behave badly when calling them too quickly. We don't need calling them anyway as this is not considered to be user action, and if our calls fail, the history position is unchanged.

Issue introduced in #1469.
2025-04-04 12:29:45 +01:00
Ellie Huxtable
9d816d16db
Revert "chore: update to rust 1.86 (#2666)" (#2667)
This reverts commit f0e8cc753e.
2025-04-03 13:40:37 +01:00
Ellie Huxtable
f0e8cc753e
chore: update to rust 1.86 (#2666)
* chore: update to rust 1.86

* fix: clippy errors from 1.86

* fix: update nix sha256
2025-04-03 13:10:35 +01:00
Michelle Tilley
37b2e9a98a
fix(kv): Filter deleted keys from kv list (#2665)
* fix(kv): Filter deleted keys from `kv list`

* Clippy
2025-04-03 12:50:49 +01:00
Ellie Huxtable
da672d5bc3 chore(release): prepare for release 18.5.0-beta.2 2025-04-02 13:23:07 +01:00
Gokul
fa84d02f01
fix: allow -ve values for timezone (#2609)
* allow -ve values for timezone

* allow optional values for timezone

* clippy fixes
2025-04-02 12:37:36 +01:00
Michelle Tilley
653894d359
feat: Binaries as subcommands (#2661)
* Run 'atuin-<subcmd>' if present when a given subcommand is not recognized

* Send errors to stderr

* Use String instead of OsString for external subcommands

* Remove unused import

* Move external subcommand handling up a level

* Clippy
2025-04-02 12:09:06 +01:00
依云
a82a001391
fix(zsh): fix an error introduced earilier with support for bracketed paste mode (#2651)
An extra newline was written to the terminal and caused issues. See https://github.com/atuinsh/atuin/pull/2646#issuecomment-2757157442.
2025-04-01 17:12:01 +01:00
Frank Hamand
06edab617a
fix: add redundant clones to clippy and cleanup instances of it (#2654) 2025-04-01 15:47:25 +01:00
Michelle Tilley
6072241422
fix(stats): Ignore leading environment variables when calculating stats (#2659)
* Ignore leading environment variables when calculating stats

* There's always an extra println

* Make clippy happy

* We don't actually need the tokens
2025-04-01 15:39:28 +01:00
Michelle Tilley
cb38ab3b1f
feat(kv): Add support for 'atuin kv delete' (#2660) 2025-04-01 15:34:25 +01:00
Ellie Huxtable
e8df3d168e
fix: typeerror in client sync code (#2647)
* fix: typeerror in client sync code

Fixes #2645

This is really weird

1. I have not touched this code in _years_. It has not changed. In
   recent rust versions, it has a typeerror (see linked issue)
2. This does not occur when running `cargo build`, in release mode or
   otherwise. It only occurs with `cargo install`
3. I can't find any other occurences of this typeerror online - unsure
   if it is a compiler regression? The code here is not very complex at
    all.

* chore(clippy): remove unused imports
2025-03-25 15:18:10 +00:00
依云
cf9efd84cb
feat(zsh): re-enable bracketed paste (#2646)
* feat(zsh): re-enable bracketed paste

atuin will reset it so after exiting atuin without executing a command,
bracketed paste mode is disabled until a command is executed. This
breaks e.g. the bracketed-paste-url-magic widget.

This change will re-enable it if it's enabled; when it's disabled or
unavailable, $zle_bracketed_paste[1] will be empty string.

* silent shellcheck
2025-03-25 11:31:27 +00:00
Farid Zakaria
ff22f8604d
fix(1289): clear terminal area if inline (#2600)
Pulled from https://github.com/atuinsh/atuin/pull/2543
Fixes interactive mode in fish where the terminal wasn't being displayed properly.

fixes #1289

Co-authored-by: Lucas Trzesniewski <lucas.trzesniewski@gmail.com>
2025-03-24 11:24:50 +00:00
依云
92ff75604d
feat: option to include duplicate commands when printing history commands (#2407) 2025-03-24 11:16:26 +00:00
Shroomy
9f9c82d2d8
fix(build): change atuin-daemon build script .proto paths (#2638)
Modify paths specified in atuin-daemon build.rs to make tonic-build
print the correct cargo:rerun-if-changed instructions.

Fixes atuin-daemon being rebuilt unconditionally, even if .proto files
are unchanged.
2025-03-24 11:01:19 +00:00
dependabot[bot]
ef8717848c
chore(deps): bump tower-http from 0.5.2 to 0.6.2 (#2641)
Bumps [tower-http](https://github.com/tower-rs/tower-http) from 0.5.2 to 0.6.2.
- [Release notes](https://github.com/tower-rs/tower-http/releases)
- [Commits](https://github.com/tower-rs/tower-http/compare/tower-http-0.5.2...tower-http-0.6.2)

---
updated-dependencies:
- dependency-name: tower-http
  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>
2025-03-24 11:00:30 +00:00
Benjamin Weinstein-Raun
f0fca3d7f3
fixes #1884: HISTFILE can be a directory or a file (#2630)
Xonsh history import was failing (in the default xonsh configuration)
because $HISTFILE is actually a directory in that case. This change sets
up the xonsh import to check for a *directory* instead of a regular
file, and makes it clearer that other importers expect a regular file.
2025-03-24 11:00:16 +00:00
Dhruv Thakur
2a60c50000
chore: show host and user in inspector (#2634)
* chore: show host and user in inspector

* chore: show host and user on separate lines
2025-03-21 13:16:02 +00:00