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

[Bug]: Defaults to fish and conf.d ? #2340

Open
orsenthil opened this issue Aug 3, 2024 · 4 comments
Open

[Bug]: Defaults to fish and conf.d ? #2340

orsenthil opened this issue Aug 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@orsenthil
Copy link

What did you expect to happen?

I expect atuin to install and setup the configuration

What happened?

(.venv) (base) ➜  todo git:(main) ✗ curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
 _______  _______  __   __  ___   __    _
|   _   ||       ||  | |  ||   | |  |  | |
|  |_|  ||_     _||  | |  ||   | |   |_| |
|       |  |   |  |  |_|  ||   | |       |
|       |  |   |  |       ||   | |  _    |
|   _   |  |   |  |       ||   | | | |   |
|__| |__|  |___|  |_______||___| |_|  |__|

Magical shell history

Atuin setup
https://github.com/atuinsh/atuin
https://forum.atuin.sh

Please file an issue or reach out on the forum if you encounter any problems!

===============================================================================

downloading atuin 18.3.0 x86_64-apple-darwin
installing to /Users/senthil/.atuin/bin
  atuin
  atuin-update
everything's installed!
mkdir: /Users/senthil/.config/fish/conf.d: Permission denied
ERROR: command failed: mkdir -p /Users/senthil/.config/fish/conf.d

Atuin doctor output

~/.atuin/bin/atuin doctor
Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [],
    "preexec": null
  },
  "system": {
    "os": "Darwin",
    "arch": "x86_64",
    "version": "13.6.7",
    "disks": [
      {
        "name": "Untitled",
        "filesystem": "apfs"
      },
      {
        "name": "Untitled",
        "filesystem": "apfs"
      }
    ]
  }
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@orsenthil orsenthil added the bug Something isn't working label Aug 3, 2024
@ellie
Copy link
Member

ellie commented Aug 5, 2024

mkdir: /Users/senthil/.config/fish/conf.d: Permission denied

Looks like something is up with your home directory permissions. If you could fix those and retry, we should be good to go

@amartyadav
Copy link

amartyadav commented Aug 6, 2024

@ellie , I have the exact problem when trying to download atuin using curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh.

And nothing else seems to have a problem with permissions in my home directory. Some detailed insight would be helpful.

I have zsh in my terminal, but atuin defaults to using .bash_profile and fish, just like OP's issue. I am not sure if that is the intended way, but my first instinct was that it should use my zsh profile? Or am I wildly wrong here? It is able to add the following lines to me .zshrc:

. "$HOME/.atuin/bin/env" eval "$(atuin init zsh)"

@amartyadav
Copy link

@orsenthil , I just realised that using the curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh installation method fails (at least on my macos apple silicon), and so does using homebrew (the tui doesn't show up even after successful installation from homebrew).

I reinstalled atuin using cargo (follow the docs, and install the rust toolchain using rustup first). Then in your terminal - echo 'eval "$(atuin init zsh)"' >> ~/.zshrc.

And then restart your terminal. This correctly installs it, and the tui is visible.

@ellie

@ellie
Copy link
Member

ellie commented Aug 6, 2024

Hmmm sounds like the part where we add the atuin binary to PATH is failing. I believe it adds it to all shells, will check. Can you share the file permissions you have set for that path? Or any parent directory of it, if it doesn't exist

Otherwise, our script automatically adds the shell init:

atuin/install.sh

Lines 43 to 54 in 90e7d28

if ! grep -q "atuin init zsh" "${ZDOTDIR:-$HOME}/.zshrc"; then
printf '\neval "$(atuin init zsh)"\n' >> "${ZDOTDIR:-$HOME}/.zshrc"
fi
# Use of single quotes around $() is intentional here
# shellcheck disable=SC2016
if ! grep -q "atuin init bash" ~/.bashrc; then
curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh
printf '\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh\n' >> ~/.bashrc
echo 'eval "$(atuin init bash)"' >> ~/.bashrc
fi

using homebrew (the tui doesn't show up even after successful installation from homebrew).

The docs cover installations with package managers, where manually installing the shell plugin is required: https://docs.atuin.sh/guide/installation/

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

3 participants