Skip to content
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

[Feature Request]: Support for multiple shells with separate stores #2540

Open
1 task done
Radg opened this issue Jan 10, 2025 · 0 comments
Open
1 task done

[Feature Request]: Support for multiple shells with separate stores #2540

Radg opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Radg
Copy link

Radg commented Jan 10, 2025

What did you expect to happen?

First of all thanks for the great tool!

I'd like to use atuin in fish and zsh with different sync accounts. I've prepared two sets of configs:

  1. ~/.config/atuin/config.toml for fish with default values of db_path, key_path and session_path
  2. ~/.config/atuin-zsh/config.toml for zsh with custom values:
cat ~/.config/atuin-zsh/config.toml | grep -E 'db_path|key_path|session_path'
db_path = "$HOME/.local/share/atuin-zsh/history.db"
key_path = "$HOME/.local/share/atuin-zsh/key"
session_path = "$HOME/.local/share/atuin-zsh/session

Also I set

echo $ATUIN_CONFIG_DIR
/Users/user/.config/atuin-zsh

for zsh shell

I've registered/logged into my self-hosted atuin server in each of shells w/o any issues and imported history. I am expecting, that I'll have two separate stores with separate histories

What happened?

But it looks like that atuin uses first (fish) shell's atuin store, I see it by identical number of history records:

fish

atuin info
Config files:
client config: "/Users/user/.config/atuin/config.toml"
server config: "/Users/user/.config/atuin/server.toml"
client db path: "/Users/user/.local/share/atuin/history.db"
key path: "/Users/user/.local/share/atuin/key"
session path: "/Users/user/.local/share/atuin/session"

Env Vars:
ATUIN_CONFIG_DIR = "None"

Version info:
version: 18.4.0

echo $SHELL && atuin store status | grep idx
/usr/local/bin/fish
		idx: 11210
		idx: 785
		
eza -la ~/.local/share/atuin/
.rw------- 6.6M user 11 Jan 00:56 history.db
.rw------- 4.6M user 11 Jan 00:56 history.db-wal
.rw-------   32 user 11 Jan 00:07 host_id
.rw-------   72 user 11 Jan 00:11 key
.rw-------   27 user 11 Jan 00:40 last_sync_time
.rw-------   27 user 11 Jan 00:10 last_version_check_time
.rw-------    6 user 11 Jan 00:10 latest_version
.rw-------  11M user 11 Jan 00:56 records.db
.rw-------  33k user 11 Jan 00:56 records.db-shm
.rw------- 4.3M user 11 Jan 00:56 records.db-wal
.rw-------   32 user 11 Jan 00:14 session

zsh

atuin info
Config files:
client config: "/Users/user/.config/atuin/config.toml"
server config: "/Users/user/.config/atuin/server.toml"
client db path: "/Users/user/.local/share/atuin-zsh/history.db"
key path: "/Users/user/.local/share/atuin-zsh/key"
session path: "/Users/user/.local/share/atuin-zsh/session"

Env Vars:
ATUIN_CONFIG_DIR = "/Users/user/.config/atuin-zsh"

Version info:
version: 18.4.0

echo $SHELL && atuin store status | grep idx
/bin/zsh
		idx: 784
		idx: 11210
		
eza -la ~/.local/share/atuin-zsh
.rw-------  12k user 11 Jan 00:44 history.db
.rw-------  33k user 11 Jan 00:56 history.db-shm
.rw------- 622k user 11 Jan 00:56 history.db-wal
.rw-------   72 user 11 Jan 00:19 key

At the same time atuin didn't "mix" histories between shells, I believe due to different keys used.

Thanks!

Atuin doctor output

atuin doctor
Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

{
  "atuin": {
    "version": "18.4.0",
    "sync": {
      "cloud": false,
      "records": true,
      "auto_sync": true,
      "last_sync": "2025-01-10 21:40:29.333041 +00:00:00"
    },
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "fish",
    "default": "fish",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Darwin",
    "arch": "x86_64",
    "version": "15.2",
    "disks": [
      {
        "name": "MacDrive",
        "filesystem": "apfs"
      },
      {
        "name": "MacDrive",
        "filesystem": "apfs"
      }
    ]
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Radg Radg added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant