Skip to content

Instantly share code, notes, and snippets.

@dreamerlzl
Created February 24, 2023 02:21
Show Gist options
  • Save dreamerlzl/40420804a4a7be36be685ff8967319e6 to your computer and use it in GitHub Desktop.
Save dreamerlzl/40420804a4a7be36be685ff8967319e6 to your computer and use it in GitHub Desktop.
Automatically switch rust-analyzer channel during rustup default
# assumption: you use `rustup component add rust-analyzer` to manage RA
# you could check that by seeing whether is a rust-analyzer under `~/.rustup/toolchains/${your_toolchain}/bin`
# place this exectuable under dir like ~/.cargo/bin
#!/usr/bin/fish
eval (rustup which --toolchain (string split - (rustup default) | head -n 1) rust-analyzer) $argv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment