-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atuin won't update history after initial import. #1798
Comments
I don't know why I missed this but it seems to be fixed with the latest update (18.0.2) as per #1750 (comment) I am not using bash-preexec nor ble.sh by the way and there's no indication from the install process that either of these are necessary. I'll wait for the patch to land in the OpenSUSE repo. Sorry for the noise. |
Glad it's sorted!
Our docs specify this: https://docs.atuin.sh/guide/installation/#shell-plugin. It's also listed in the README If you use the install script, this is handled for you |
@ellie Thanks for linking that! I've read the guide, but it seems like I've missed this line:
I did read this one, but the phrasing was a bit ambiguous to me:
Was misunderstood as: If you need to use the shell plugin (whatever that may be), you would need to install it separately. Especially since it mentions ble.sh, I was under the impression that installing this was only necessary if you are using atuin in conjunction with something like ble.sh. Since I wasn't, I thought that it would not be necessary to install. I defaulted to using the package manager because I noticed there was a package available for my distro. I would have expected that installing atuin through my package manager would install the required components as well, just like the bash-completions are automatically installed. By the way, I tried to check my installation validity with
(I now remember why I wanted to open this issue in the first place, it was because I couldn't find any other issues with this error. I just simply forgot to put this output in the issue description. My bad) I think this raw error justifies an actual issue. Okay, I'm reopening this issue. While some of this is definitely best described as 'user error', I'd like to propose some suggestions that might help improve the project and the experiences of first time users. My suggestions:
I've played around with the docs for a bit, I may have changed a bit too much for your liking, but let me know if you'd be interested and I'll create a PR for it. |
That actually looks great, I'd be happy to review the PR! The code error you see is because you're not logged in, but it's been fixed in main anyway |
Just wanted to say, same issue on NixOS, atuin simply doesn't update history for me. All I did was install the NixOS package, and put the eval line in my bashrc. With bash being the most common shell in the world, atuin should really just work out of the box without the need for installing other dependencies. Maybe you can vendor them? Currently on NixOS one needs to add |
Just installing ble.sh doesn't make it work. You need to load Also, $ bash "$(blesh-share)/ble.sh" --version |
I'm aware that it needs to be sourced. The version thing was just to demonstrate, that it was installed. Didn't realize that it doesn't have version option. Still atuin doesn't receive incoming history, with ble.sh sourced. But thanks for you chiming in, I'm sure it's something weird about my setup. |
Do you change the setting of ble.sh so that the syntax highlighting is turned off? I'm asking because the image in your comment #1798 (comment) doesn't look inside blesh's attached state. If ble.sh is correctly loaded in your session, the syntax highlighting (which is not seen in your image) should be turned on unless it is intentionally turned off. What is the result of the following command? $ declare -p BLE_VERSION BLE_ATTACHED Also what is the result of the following command? $ declare -p ATUIN_SESSION |
Yes, I first tried
|
Thanks. Hmm, I'm a bit confused about whether you are now using ble.sh or not using ble.sh. |
Currently, I'm using |
If you are using ble.sh, you need to source $ ble-import -q |
|
Thanks. The result tells that
|
What is your terminal? This is related to the feature called |
Yes, that is because blesh's module |
Atuin's default installation (using
This only applies to the users who install Atuin manually (without using I guess it's NixOS's packaging issue. |
The ordering is ble.sh then atuin and I'm using Kitty as my terminal emulator. But yeah, it has to be a little detail about my machine, maybe NixOS packaging, though I doubt it. |
Thanks. I tried ble-0.4.0-devel3, but there doesn't seem to be any problem in my environment (but it's not NixOS, so something may be different). What is clear is that Could you try the following setting in your bashrc and provide the result? # bashrc
source "$(blesh-share)/ble.sh"
eval "atuin_init() { $(atuin init bash); }"
set -x
atuin_init
set +x |
Thanks. kitty is supposed to be supported by ble.sh. For this specific case, ble.sh uses kitty's keyboard protocol. Kitty's keyboard protocol uses a pair of push/pop sequences ( Could you provide the result of the following command? $ ble/widget/display-shell-version |
$ ble/widget/display-shell-version
GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu) [NixOS 24.05 (Uakari)]
ble.sh, version 0.4.0-devel3+1a5c451c (noarch) [git 2.39.0, GNU Make 4.3, GNU Awk 5.1.1, API: 3.1 (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)]
bash-completion, version 2.11 (hash:2bf1bb7c3e7593cc63953675f56def7030310791, 76396 bytes) (noarch)
locale: LANG=en_US.UTF-8
terminal: TERM=xterm-kitty wcwidth=15.0-west/15.0-2+ri, kitty:0 (1;4000;32)
|
# flake.nix
# Defines a standalone NixOS virtual machine with ble.sh and atuin installed and configured.
# Requires only the nix executable installed, see https://nixos.org/download/#download-nix
# build and run with:
# nix build "./#nixosConfigurations.myvm.config.virtualisation.vmVariant.system.build.vm" --experimental-features 'nix-command flakes' && $TERMINAL result/bin/run-*-vm &
{
outputs = {nixpkgs,...}: { nixosConfigurations = {
myvm = nixpkgs.lib.nixosSystem {
modules = [
({ pkgs, lib, config, ... }:
{
virtualisation.vmVariant.virtualisation = {
graphics = false;
diskImage = null;
mountHostNixStore = true;
writableStoreUseTmpfs = false;
};
users.mutableUsers = false;
users.users = { me.isNormalUser = true; me.hashedPassword = ""; };
users.users.me.extraGroups = [ "wheel" ];
services.getty.autologinUser = "me";
security.sudo.wheelNeedsPassword = false;
nix.settings.trusted-users = [ "root" "@wheel" ];
environment.etc.nixpkgs.source = pkgs.path;
nix.nixPath = [ "nixpkgs=/etc/nixpkgs" ];
environment.sessionVariables = {
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
HISTFILE = "\${HOME}/.bash_history";
};
environment.shellAliases = { sht = "sudo shutdown -h now"; tt = "stty columns 200"; };
environment.enableAllTerminfo = true;
environment.extraSetup = ''rm --force $out/bin/nix-channel'';
system.stateVersion = config.system.nixos.release;
nixpkgs.hostPlatform = "x86_64-linux";
console.useXkbConfig = true;
programs.neovim = { enable = true; defaultEditor = true; viAlias = true; vimAlias = true; };
environment.systemPackages = with pkgs; [ blesh atuin ];
system.userActivationScripts.bash = ''
mkdir -p .cache
echo 'echo hallo' > .bash_history
echo '
export TERM=xterm-kitty
source "$(blesh-share)/ble.sh"
eval "$(atuin init bash)"
' > .bashrc
echo '[[ $- == *i* && -f "$HOME/.bashrc" ]] && source "$HOME/.bashrc"' > .bash_profile
${lib.getExe pkgs.atuin} import auto
'';
})];
};
};
};
} Btw. corroborating that it's not a Nix packaging issue is, that it works just fine in a quick NixOS virtual machine. Above is the definition of said machine, if you want to try yourself. |
Thank you for the results.
This doesn't seem # bashrc
type -a atuin >&2
atuin --version >&2
source "$(blesh-share)/ble.sh"
eval "$(atuin init bash)" |
I had a similar issue with history not being recorded. I'm on I think I missed this because I got linked to |
The detailed explanations existed in README.md of the main repository atuinsh/atuin has been removed by [1] in favor of atuinsh/docs. However, the installation instructions in atuinsh/docs are not up-to-date and confuse the users [2]. We should update atuinsh/docs to pick some of the informatioin removed by [1]. [1] atuinsh/atuin#2203 [2] atuinsh/atuin#1798 (comment)
I have this problem on Debian with Bash. |
New user here, I'm trying to get atuin to work under OpenSUSE Tumbleweed, but my history isn't updating and atuin wasn't working out of the box.
I have installed the package through the package repositories with zypper.
I'm not sure whether this is an issue for this repo, the package maintainers at OpenSUSE or if I'm doing something wrong.
To reproduce
zypper in atuin
(will also automatically install 'atuin-bash-completion')eval "$(atuin init bash)"
to.bashrc
atuin import auto
My terminal is Konsole, with the command set to
/bin/bash
.The text was updated successfully, but these errors were encountered: