Skip to content

autocompletion broken on zsh #5247

@SahandCX

Description

@SahandCX

Expected behavior

When I press mc then tab

mc <TAB>
admin    config   diff     find     ls       mirror   policy   session  sql      update   watch
cat      cp       event    head     mb       pipe     rm       share    stat     version

Actual behavior

For some reason I cant upload pics / gifs so here is a paste:

svv-vm-linux517% mc
-                                             legal
|                                             legalhold
[$MC_CONFIG_DIR]                              license
[$MC_DEBUG]                                   LICENSE:
[$MC_DISABLE_PAGER]                           lifecycle
[$MC_INSECURE]                                --limit-download
[$MC_JSON]                                    limits
[$MC_LIMIT_DOWNLOAD]                          --limit-upload
[$MC_LIMIT_UPLOAD]                            lines
[$MC_NO_COLOR]                                list
[$MC_QUIET]                                   listen
[$MC_RESOLVE]                                 liveness
2015-2025                                     local
a                                             ls
access                                        make
add                                           manage
address.                                      maximum
admin                                         mb
AGPLv3                                        'mc
alias                                         mc
an                                            measure
and                                           metadata
anonymous                                     MiB/s,
[ARGUMENTS...]                                MinIO
--autocompletion                              MinIO,
--autocompletion'                             minio.local:9000=10.10.75.1
auto-completion                               mirror
autocompletion                                move
bar                                           mv
batch                                         'n'
between                                       name,
bucket                                        NAME:
buckets                                       --no-color
(c)                                           not
-C                                            notification
cat                                           notifications
certificate                                   object
check                                         object(s)
checks                                        objects
Client                                        od
cluster                                       of
color                                         on
[COMMAND                                      operations
COMMAND                                       or
commands                                      output
COMMANDS:                                     pager
config                                        path
--config-dir                                  perform
configuration                                 ping
configure                                     pipe
contents                                      print
copy                                          progress
Copyright                                     Provider
COPYRIGHT:                                    put
cors                                          PUT/DELETE
CORS                                          -q
cp                                            queries
credentials                                   --quiet,
custom                                        quota
--custom-header                               rate
date                                          raw
--debug                                       rb
debug                                         ready
(default:                                     recursively
diff                                          related
differences                                   release
disable                                       remote
--disable-pager,                              remove
disk                                          replicate
display                                       replication
download                                      request.
downloads                                     --resolve
--dp                                          resolves
du                                            retention
enable                                        rm
encrypt                                       run
encryption                                    s3
event                                         search
events                                        server
Example:                                      servers
file                                          set
filesystems.                                  share
find                                          shell
first                                         show
[FLAGS]                                       side
FLAGS                                         single
FLAGS:                                        site
folder                                        size,
for                                           sql
format                                        SSL
format.                                       stat
formatted                                     STDIN
generate                                      stdout
get                                           storage
GiB/s.                                        stream
GLOBAL                                        summarize
GNU                                           support
-h                                            synchronize
-h]                                           tag
-H                                            tags
head                                          temporary
header                                        the
--help,                                       theme
help                                          TIP:
hold                                          to
"/home/sahjoh/.mc")                           tree
HOST[:PORT]                                   two
HTTP                                          undo
<https://www.gnu.org/licenses/agpl-3.0.html>  unlimited)
IDentity                                      update
idp                                           upload
if                                            uploads
ilm                                           URL
in                                            usage
Inc.                                          USAGE:
--insecure                                    Use
install                                       -v
internal                                      value
IP                                            value,
is                                            verification
jobs                                          --version,
--json                                        version
JSON                                          versioning
'key:value'                                   watch
KiB/s,                                        your
latest
svv-vm-linux517% mc

Steps to reproduce the behavior

Installed mc:

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc

Move to $HOME/bin

mv ./mc $HOME/bin/mc

Ran mc --autocompletion

svv-vm-linux517% mc --autocompletion

mc: Your shell is set to 'zsh', by env var 'SHELL'.
mc: enabled autocompletion in your 'zsh' rc file. Please restart your shell.

Restarted shell and tried to use autocomplete.

mc --version

svv-vm-linux517% mc --version
mc version RELEASE.2025-07-21T05-28-08Z (commit-id=ee72571936f15b0e65dc8b4a231a4dd445e5ccb6)
Runtime: go1.24.5 linux/amd64
Copyright (c) 2015-2025 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>

System information

System:
  Kernel: 6.8.0-78-generic x86_64 bits: 64 compiler: N/A Desktop: GNOME 42.9
    tk: GTK 3.24.33 wm: gnome-shell dm: GDM3
    Distro: Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Machine:
  Type: Vmware System: VMware product: VMware20,1 v: N/A
    serial: <superuser required> Chassis: No Enclosure type: 1
    serial: <superuser required>
  Mobo: Intel model: 440BX Desktop Reference Platform
    serial: <superuser required> UEFI: VMware
    v: VMW201.00V.24504846.B64.2501180339 date: 01/18/2025

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions