Skip to content

Fish completions for rustup suggest files alongside subcommands #5172

Open

Description

@NikolaiQuasarka

Verification

Problem

In fish shell, when you use an autocomple using tab you're getting directories and files alongside rustup subcommands.

Image

As i know, rustup doesn't use any directories or files as arguments, so i recognize it as a bug

Steps

  1. Setup fish autocomplete. If you are on linux you can run rustup completions fish rustup > ~/.config/fish/completions/rustup.fish
  2. In fish write 'rustup '(leave one space char) and press tab. It should display subcommands and files and dirs

Possible Solution(s)

You can add 'complete -c rustup -f' in the beginning of fish autocomplete output. It will prevent display of files and directories.
I also tried to fix this in source code. I haven't find better solution than this:

Image

I tried to find out how to make it a bit more beautiful with clap but no result.

Notes

No response

Rustup version

rustup 1.29.2 (2026-10-22)

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/nikolai/.local/share/rustup

installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (active, default)
nightly-x86_64-unknown-linux-gnu
1.93-x86_64-unknown-linux-gnu
1.93.0-x86_64-unknown-linux-gnu
1.95.0-x86_64-unknown-linux-gnu
1.96.0-x86_64-unknown-linux-gnu

active toolchain
----------------
name: stable-x86_64-unknown-linux-gnu
active because: it's the default toolchain
installed targets:
  wasm32-unknown-unknown
  x86_64-unknown-linux-gnu

OS version

OS: CachyOS
Kernel: Linux 7.3.0-4-cachyos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions