Weekly release 2024.14

Testing release for the 10th week of 2024

A little late with this one, sorry! I spent the last couple of weeks recovering from flu :face_with_thermometer:

Caveats

This is a pre-release, and is not as tested as a production build

  1. It may not always be easy and without manual steps to downgrade from a weekly build to the last stable. It will be possible to upgrade automatically to the next stable after a weekly.
  2. Weekly builds are more likely to contain bugs or regressions. They are unlikely to lose data, but do be cautious when running the bleeding edge.
  3. Weekly builds may contain functionality not yet in a production release. Please let us know what you think!

Download

You can download binaries here: Release Β· atuinsh/atuin@e7f808d Β· GitHub

Download, extract, and put atuin somewhere in your PATH.

Alternatively, run

cargo install --git https://github.com/atuinsh/atuin --tag weekly

Changes

e7f808d5 feat: sync v2 default for new installs (#1914)
48b4e347 feat(search): add better search scoring (#1885)
3ae83460 chore(deps): bump sysinfo from 0.30.6 to 0.30.7 (#1888)
f881ce5c fix(doctor): detect preexec plugin using env ATUIN_PREEXEC_BACKEND  (#1856)
616dabc2 chore(deps): flake.lock: Update (#1910)
5981a882 chore(deps): bump lukemathwalker/cargo-chef (#1901)
5c54c2af feat(install): Update install.sh to support KDE Neon (#1908)
5c4afd6a fix(nu): Update atuin.nu to resolve 0.92 deprecation (#1913)
82a7c8d3 fix(search): case insensitive hostname filtering (#1883)
b04fc471 feat: add atuin prefix binding (#1875)
ad766cc8 fix: pass search query in via env for *Nushell* (#1874)
da8cc481 chore: add section to issue form (#1873)
11c0dfc1 chore: require atuin doctor in issue form (#1872)
9ae167d4 chore: add issue form (#1871)
c3306367 feat(server): check PG version before running migrations (#1868)
3e2e7292 docs: add security contact (#1867)
6aa90c0e fix: pass search query in via env (#1865)
02d79fee fix(search): allow empty search (#1866)
3368d2fa feat(search): allow specifying search query as an env var (#1863)
04f2c956 fix(crate): add missing description (#1861)
dc2d0be0 chore(deps): bump whoami from 1.5.0 to 1.5.1 (#1851)
0d3741f1 feat(search): process [C-h] and [C-?] as representations of backspace (#1857)

Testing

A few things to test here!

Adjusted fuzzy search scoring

Enable with smart_sort = true. This will sort search items with the following priority

  1. Prefer results prefixed with command
  2. Prefer results containing the command in its entirety
  3. Bias by more recent commands

Later, I’d like to also bias by directory, etc. When it comes to release time I’d like to make this the default, especially for fuzzy searching.

Keybind prefix

I’ve added a key binding prefix, like tmux/screen. This is because common editing shortcuts have used up all the other available shortcuts, and changing them is often contentious.

The current prefix is ctrl-a. The only binding that uses it at present is ctrl-a d, to delete a history result without opening the inspector.

2 Likes

Tested on commits from the weekly tag up to the latest 894eaa6faff8.

Oh, the smart sort is so amazing :heart: I did not know how much I needed this. It seems to work well. Hmm, I think there should be a prefix similar to ^ which would possibly disable the smart sort for the current search? Not sure. My use case is this:
I want to get to some command containing atuin, but not prefixed by atuin. For example, I can type <space>atuin (whitespace followed by atuin) to disable the prefix search. But if the command did not have space (probably very unlikely, but possible, something like makeatuin alias, for example), getting to the command is slow. This is because the prefix search mode is too aggressive. I would say that there needs to be a quick disable smart sort and show commands ordered by last use datetime instead, as in the normal fuzzy search.

Example

As can be seen in the example, the prefixes completely clog up my fullscreen Atuin window, even if I ran them 1 month ago only once, but I cannot get to the open Atuin config I ran 16 mins ago. I think there needs to be maybe a shortcut to temporarily disable the prefix search or smart sort in general.

β”‚   882ms 1mo ago fd "atuin" /                                                                                                                                                                β”‚
β”‚   26ms  1mo ago which atuin                                                                                                                                                                 β”‚
β”‚   19ms  26d ago cd atuin                                                                                                                                                                    β”‚
β”‚   13s    9m ago hx ~/.config/atuin/config.toml  # THIS I NEED.                                                                                                                                            β”‚
β”‚   0s    1mo ago atuin history init-store                                                                                                                                                    β”‚
β”‚   35ms  1mo ago atuin store status                                                                                                                                                          β”‚
β”‚   40ms  1mo ago atuin config alias set make m                                                                                                                                               β”‚
β”‚   50ms  1mo ago atuin config alias set just j                                                                                                                                               β”‚
β”‚   49ms  1mo ago atuin config alias set lazygit l                                                                                                                                            β”‚
β”‚   60ms  1mo ago atuin config alias set lazygit lg                                                                                                                                           β”‚
β”‚   40ms  1mo ago atuin config alias --help                                                                                                                                                   β”‚
β”‚   41ms  1mo ago atuin config alias delete f                                                                                                                                                 β”‚
β”‚   55ms  1mo ago atuin config alias delete lazygit                                                                                                                                           β”‚
β”‚   183ms 1mo ago atuin config alias set i make                                                                                                                                               β”‚
β”‚   36ms  1mo ago atuin config alias delete i                                                                                                                                                 β”‚
β”‚   34ms  1mo ago atuin config alias set lg lazygit                                                                                                                                           β”‚
β”‚   43ms  1mo ago atuin config alias delete lg                                                                                                                                                β”‚
β”‚   31ms  1mo ago atuin config alias set j just                                                                                                                                               β”‚
β”‚   39ms  1mo ago atuin config alias delete j                                                                                                                                                 β”‚
β”‚   51ms  1mo ago atuin config alias delete just                                                                                                                                              β”‚
β”‚   68ms  1mo ago atuin init zsh                                                                                                                                                              β”‚
β”‚   28ms  1mo ago atuin config alias delete make                                                                                                                                              β”‚
β”‚   54ms  1mo ago atuin config alias delete v                                                                                                                                                 β”‚
β”‚   39ms  1mo ago atuin config alias set m "make run"                                                                                                                                         β”‚
β”‚   78ms  1mo ago atuin config alias set m make                                                                                                                                               β”‚
β”‚   41ms  1mo ago atuin config alias set m "make"                                                                                                                                             β”‚
β”‚   52ms  1mo ago atuin config alias delete m                                                                                                                                                 β”‚
β”‚   64ms  1mo ago atuin config alias list                                                                                                                                                     β”‚
β”‚   1s    1mo ago atuin search -i                                                                                                                                                             β”‚
β”‚   27ms  1mo ago atuin search --search-mode=prefix f project                                                                                                                                 β”‚
β”‚   34ms  1mo ago atuin search --search-mode=prefix f project --delete                                                                                                                        β”‚
β”‚ 9 278ms 1mo ago atuin sync                                                                                                                                                                  β”‚
β”‚ 8 1s    1mo ago atuin status                                                                                                                                                                β”‚
β”‚ 7 44ms  26d ago atuin search --search-mode=prefix "r/gl[gl]"                                                                                                                                β”‚
β”‚ 6 44ms  26d ago atuin search --search-mode=prefix "gl[gl]"                                                                                                                                  β”‚
β”‚ 5 16ms  26d ago atuin search --search-mode=prefix gl[gl]                                                                                                                                    β”‚
β”‚ 4 30ms  26d ago atuin search --search-mode=prefix gll                                                                                                                                       β”‚
β”‚ 3 21ms  26d ago atuin search --help                                                                                                                                                         β”‚
β”‚ 2 19ms  26d ago atuin duf                                                                                                                                                                   β”‚
β”‚ 1 321ms 20d ago atuin stats --count 100                                                                                                                                                     β”‚
β”‚ > 245ms  8m ago atuin doctor                                                                                                                                                                β”‚
│─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
β”‚[  WORKSPACE   ] atuin          

The keybind prefix needs, in my opinion, a visual response to the user that is it active, similarly like switching modes in Vim, and ideally when the prefix is performed, show the available commands at the top instead of the general commands such as switching to inspector, etc. For example, have a look at GitUI and how they show the contextual keybindings at the bottom, if you switch between different panes (status, log, files, etc.), or start a specific operation (rebase etc.), the keybindings change depending on the context and currently active β€œinput modes”.

ctrl-a d is a wonderful shortcut. I will be using it a lot, I presume.

1 Like

atuin doctor now shows that I am running ble.sh. :tada:

shell:
  name: bash
  plugins:
  - atuin
  - blesh
1 Like

Don’t apologise for being ill! You’re human and have a life outside of this :slightly_smiling_face:

1 Like

Would there be value in $atuin doctor also returning a pastebin URL?

Are you really asking me? (You replied to my comment.) I believe the question might be rather for @ellie

But here’s my take on this: in theory it’s not a bad idea, on the other side I wouldn’t want SW to send data anywhere unless I allow it. So if it is guarded via an option, I’d be ok with it. Otherwise I would have to add firewall rules so that atuin can’t access anything except my sync server.