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

Missing directory error when adding Fish completions #1779

Closed
yhoiseth opened this issue Apr 20, 2019 · 0 comments · Fixed by #1780
Closed

Missing directory error when adding Fish completions #1779

yhoiseth opened this issue Apr 20, 2019 · 0 comments · Fixed by #1780
Labels

Comments

@yhoiseth
Copy link
Contributor

Thanks for making Rust 😄

This is my first time trying it, and I discovered a tiny issue that might trip some people up.

Problem

When running the documented command to enable tab completions for Fish on macOS, I get:

An error occurred while redirecting file '/Users/yngve/.config/fish/completions/rustup.fish'
open: No such file or directory

Steps

  1. brew install rustup-init
  2. rustup-init
  3. Add source $HOME/.cargo/env to ~/.config/fish/config.fish
  4. rustup completions fish > ~/.config/fish/completions/rustup.fish

Possible Solution(s)

I fixed the issue by navigating into ~/.config/fish and then creating the completions directory:

➜  ~ cd .config/fish/
➜  fish mkdir completions

Then, I ran rustup completions fish > ~/.config/fish/completions/rustup.fish without problems.

My guess is that this problem is quite rare as most people using Fish have probably added the completions directory already. There are probably more elegant solutions, but I suggest adding a mkdir command to the documentation. I'll create a pull request to show what I mean.

Notes

Output of rustup --version:

rustup 1.17.0 ( )

Output of rustup show:

Default host: x86_64-apple-darwin

stable-x86_64-apple-darwin (default)
rustc 1.34.0 (91856ed52 2019-04-10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant