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

Restic autocompletion does not work in Fish shell when adding RESTIC_PASSWORD_FILE in /etc/environment #4516

Closed
Zesko opened this issue Oct 15, 2023 · 1 comment · Fixed by #4524

Comments

@Zesko
Copy link

Zesko commented Oct 15, 2023

Output of restic version

restic 0.16.0 compiled with go1.20.7 on linux/amd64

Expected behavior

  1. Install fish shell (the current version: 3.6.1)
  2. Run fish in any terminal
  3. Type $ sudo restic <Press TAB> in any terminal to show auto completion, that works fine as expected.

Steps to reproduce the behavior (Issue)

  1. /etc/environments adds RESTIC_PASSWORD_FILE=/no_password_file
  2. Reboot
  3. Try to type restic <TAB> in fish shell, auto completion does not work.
    The issue is caused by adding RESTIC_PASSWORD_FILE in /etc/environments if there is no password file or this password file is not readable for normal users except admin/root.
    But bash and zsh have no issue.

Do you have any idea what may have caused this?

/etc/environments adding RESTIC_PASSWORD_FILE=/no_password_file breaks auto-completion of restic in fish shell if the password file is not readable for users.

But bash shell and zshshell have no issue with that.

Do you have an idea how to solve the issue?

Remove RESTIC_PASSWORD_FILE=/... in /etc/environments , then reboot. The issue is fixed.
But that is not nice.

@Zesko Zesko changed the title Fish autocompletion does not work when adding RESTIC_PASSWORD_FILE in /etc/environment Restic autocompletion does not work in Fish shell when adding RESTIC_PASSWORD_FILE in /etc/environment Oct 15, 2023
@MichaelEischer
Copy link
Member

This can be reproduced using RESTIC_PASSWORD_FILE=/sdgsdf/ restic __complete backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants