There's a bunch of duplication here!
I'd also like to support syncing shell "snippets", aka just bits of
shell config that don't fit into the structure here. Potentially special
handling for PATH too.
Rather than come up with some abstraction in the beginning, which
inevitably will not fit future uses, I'm duplicating code _for now_.
Once all the functionality is there, I can tidy things up and sort a
proper abstraction out.
Something in atuin-client for map/list style synced structures would
probably work best.
1. Start on a home page, can sort onboarding/etc from there
2. Introduce zustand for state management. It's nice!
Did a production build and clicked around for a while. Memory usage
seems nice and chill.
* feat(doctor): check active preexec framework
To check if "blesh" or "bash-preexec" is loaded and active in the
current Bash session where `atuin doctor` is called, we make the Atuin
integration script for Bash to set the environment variable
`ATUIN_PREEXEC_BACKEND` and store a string when it detects "blesh" or
"bash-preexec".
To check whether the obtained ATUIN_PREEXEC_BACKEND is set by the
current session, we record SHLVL in ATUIN_PREEXEC_BACKEND and check if
it matches SHLVL of the current process.
* feat(doctor): detect the case where Atuin is initialized before blesh
* initial
* ui things
* cargo
* update, add history refresh button
* history page a bit better, add initial dotfiles page
* re-org layout
* bye squigglies
* add dotfiles ui, show aliases
* add default shell detection
* put stats in a little drawer, alias import changes
* use new table for aliases, add alias deleting
* support adding aliases
* close drawer when added, no alias autocomplete
* clippy, format
* attempt to ensure gdk is installed ok
* sudo
* no linux things on mac ffs
* I forgot we build for windows too... end of day
* remove tauri backend from workspace
Bash < 5.0 doesn't support the high-resolution clock EPOCHREALTIME, so
ble.sh uses the builtin command `time` to measure the execution times
in Bash < 5.0. This has a lower resolution of milliseconds but still
more accurate than Atuin's measurent because Atuin's measurement
includes the spawn cost of Atuin, which is typically larger than a
millisecond.
Reported-by: Georgios Vlassis <https://github.com/gvlassis>
Reference: https://github.com/atuinsh/atuin/pull/1484#issuecomment-2047068582
We have introduced initialization guards in #1533 [1], where `return
0` was used to cancel the initialization. However, this cancels the
processing of the caller (which is typically `~/.bashrc`) instead of
just canceling Atuin's initialization. In this patch, we avoid using
`return 0`. Instead, we enclose the main part of the initialization
in a big if-statement.
[1] https://github.com/atuinsh/atuin/pull/1533
* cache aliases when set locally
* handle rebuild on sync and tidy things a bit
* support all shells except nu
* make clippy happy
* fmt
* fix for no features
* fix: install script echo
* fix(nu): Update atuin.nu to resolve 0.92 deprecation (#1913)
* feat(install): Update install.sh to support KDE Neon (#1908)
KDE Neon is based on Ubuntu 22.04, but the OS List for Ubuntu-based distros does not have the string "neon". This commit adds it.
* chore(deps): bump lukemathwalker/cargo-chef (#1901)
Bumps lukemathwalker/cargo-chef from latest-rust-1.76.0-buster to latest-rust-1.77.0-buster.
---
updated-dependencies:
- dependency-name: lukemathwalker/cargo-chef
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): flake.lock: Update (#1910)
Flake lock file updates:
• Updated input 'flake-utils':
'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
→ 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/ebe6e807793e7c9cc59cf81225fdee1a03413811' (2024-02-29)
→ 'github:NixOS/nixpkgs/807c549feabce7eddbf259dbdcec9e0600a0660d' (2024-03-29)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix(doctor): detect preexec plugin using env ATUIN_PREEXEC_BACKEND (#1856)
* refactor(doctor): update func names and desc to match current impl
* fix(doctor): use environment variable to detect plugin if possible
In this patch, if the plugin provides an environment variable, we use
the environment variable to test the existence of the plugin. When an
environment variable is not available, we continue to use the mock
interactive session by "shell -ic command". We also test
shell-specific plugins only in the corresponding shells. An
additional test can be performed by a custom function for each plugin.
* chore(deps): bump sysinfo from 0.30.6 to 0.30.7 (#1888)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.6 to 0.30.7.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.6...v0.30.7)
---
updated-dependencies:
- dependency-name: sysinfo
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ivan Toriya <toriya@precisdigital.com>
Co-authored-by: Wind <WindSoilder@outlook.com>
Co-authored-by: Diego Carrasco Gubernatis <557703+dacog@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
* refactor(doctor): update func names and desc to match current impl
* fix(doctor): use environment variable to detect plugin if possible
In this patch, if the plugin provides an environment variable, we use
the environment variable to test the existence of the plugin. When an
environment variable is not available, we continue to use the mock
interactive session by "shell -ic command". We also test
shell-specific plugins only in the corresponding shells. An
additional test can be performed by a custom function for each plugin.