Repository: eza-community/eza (language: rust)

Issue:
bug: Autocompletion with tab fails when a filename contains ]
eza version: 0.15.2

command used: ``eza + TAB``
shell: zsh

output:
```sh
$ eza
_arguments:comparguments:327: invalid option definition: -A[Equivalent to --all; included for compatibility with [Communications in Computer and Information Science №377] Sunil Malipatlolla (auth.), Sabu M. Thampi, Pradeep K. Atrey, Ch - Security in Computing and Communications_ International Symposium, SSCC 2013, Mysore, India, August.pdf\ncubic-unpack\ndebian-binary\nflash-remove-optee.auto\nflash-with-optee.auto\nGEN-0000021828_Fault_Detection_Specification_-_Modular_Platform_Server_(MPS).pdf\nIFE-UHD10.mpd\nimage.png\nISD.FDS.0001.xlsx\n.~lock.ISD.FDS.0001.xlsx#\nlros\nmanjaro-kde-23.0.2-minimal-230919-linux65.iso\nqemu-system-x86_0.0_all(1).deb\nworktime.csv]
_arguments:comparguments:327: invalid option definition: -A[Equivalent to --all; included for compatibility with [Communications in Computer and Information Science №377] Sunil Malipatlolla (auth.), Sabu M. Thampi, Pradeep K. Atrey, Ch - Security in Computing and Communications_ International Symposium, SSCC 2013, Mysore, India, August.pdf\ncubic-unpack\ndebian-binary\nflash-remove-optee.auto\nflash-with-optee.auto\nGEN-0000021828_Fault_Detection_Specification_-_Modular_Platform_Server_(MPS).pdf\nIFE-UHD10.mpd\nimage.png\nISD.FDS.0001.xlsx\n.~lock.ISD.FDS.0001.xlsx#\nlros\nmanjaro-kde-23.0.2-minimal-230919-linux65.iso\nqemu-system-x86_0.0_all(1).deb\nworktime.csv]
_arguments:comparguments:327: invalid option definition: -A[Equivalent to --all; included for compatibility with [Communications in Computer and Information Science №377] Sunil Malipatlolla (auth.), Sabu M. Thampi, Pradeep K. Atrey, Ch - Security in Computing and Communications_ International Symposium, SSCC 2013, Mysore, India, August.pdf\ncubic-unpack\ndebian-binary\nflash-remove-optee.auto\nflash-with-optee.auto\nGEN-0000021828_Fault_Detection_Specification_-_Modular_Platform_Server_(MPS).pdf\nIFE-UHD10.mpd\nimage.png\nISD.FDS.0001.xlsx\n.~lock.ISD.FDS.0001.xlsx#\nlros\nmanjaro-kde-23.0.2-minimal-230919-linux65.iso\nqemu-system-x86_0.0_all(1).deb\nworktime.csv]
```

Filename causing the output:
``[Communications in Computer and Information Science №377] Sunil Malipatlolla (auth.), Sabu M. Thampi, Pradeep K. Atrey, Ch - Security in Computing and Communications_ International Symposium, SSCC 2013, Mysore, India, August.pdf``

ls works without issues:
```sh
$ ls
\[Communications\ in\ Computer\ and\ Information\ Science\ №377\]\ Sunil\ Malipatlolla\ \(auth.\),\ Sabu\ M.\ Thampi,\ Pradeep\ K.\ Atrey,\ Ch\ -\ Security\ in\ Computing\ and\ Communications_\ International\ Symposium,\ SSCC\ 2013,\ Mysore,\ India,\ August.pdf
cubic-unpack/
debian-binary
flash-remove-optee.auto
flash-with-optee.auto
GEN-0000021828_Fault_Detection_Specification_-_Modular_Platform_Server_\(MPS\).pdf
IFE-UHD10.mpd
image.png
ISD.FDS.0001.xlsx
lros/
manjaro-kde-23.0.2-minimal-230919-linux65.iso
qemu-system-x86_0.0_all\(1\).deb
worktime.csv



Discussion / hints:
I can't reproduce this.
Hmm may be related to zsh or oh-my-zsh

yep, it is seems to be related to oh-my-zsh or one of the plugins I am using. Will investigate that later
Probably this: https://github.com/z-shell/zsh-eza/pull/20

fwiw, it seems to be an issue of not defaulting to all... which I think it should do, so it's very much a bug imo
I can reproduce this on eza builded from source with source completions on zsh

Fix patch:
diff --git a/completions/zsh/_eza b/completions/zsh/_eza
index 1e81c4345..53c379c82 100644
--- a/completions/zsh/_eza
+++ b/completions/zsh/_eza
@@ -29,7 +29,7 @@ __eza() {
         --group-directories-first"[Sort directories before other files]" \
         --git-ignore"[Ignore files mentioned in '.gitignore']" \
         {-a,--all}"[Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories]" \
-        {-A,--almost-all}"[Equivalent to --all; included for compatibility with 'ls -A']" \
+        {-A,--almost-all}"[Equivalent to --all; included for compatibility with \'ls -A\']" \
         {-d,--list-dirs}"[List directories like regular files]" \
         {-D,--only-dirs}"[List only directories]" \
         {-f,--only-files}"[List only files]" \


Test patch: