Skip to content

bug: --binary and --bytes flags interaction changed with v0.23.5 #1900

Open

Description

@Hendrikto

Summary

Release v0.23.5 changed the interaction between --binary and --bytes flags. Previously, --binary --bytes output bytes, now it outputs the binary size.

Environment

❯ cat /etc/os-release | head -n1
NAME="Arch Linux"
❯ uname -a
Linux hendrik-blue 7.1.5-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 28 Jul 2026 13:49:51 +0000 x86_64 GNU/Linux
❯ eza --version
eza eza - A modern, maintained replacement for ls
v0.23.5 [+git]
https://github.com/eza-community/eza
❯ echo $SHELL         
/usr/bin/zsh
❯ zsh --version
zsh 5.9.2 (x86_64-pc-linux-gnu)
❯ kitty --version
kitty 0.48.2 created by Kovid Goyal

Expectation

The release notes mention nothing about about either flag, so I expect the same combination to continue working the same way. Specifically, --binary --bytes should output bytes.

My general expectation would be that in the case of conflicting options, the last one should take precendence, i.e.:

  • --bytes --binary should output binary
  • --binary --bytes should output bytes

I actually did not verify whether in v0.23.4, the order mattered or --bytes just always took precedence, but the actual behavior matched my expectations. In the case of --binary --bytes, bytes took precedence, which is not longer the case as of v0.23.5.

Actual Behavior

The --binary flag now always takes precedence, no matter the ordering.

❯ eza --long --binary build/rel*
.rwxr----- 11Mi hendrik  6 Aug 15:51 build/release
.rwxr----- 11Mi hendrik 31 Jul 17:00 build/release-master
❯ eza --long --binary --bytes build/rel*
.rwxr----- 11Mi hendrik  6 Aug 15:51 build/release
.rwxr----- 11Mi hendrik 31 Jul 17:00 build/release-master
❯ eza --long --bytes --binary build/rel*
.rwxr----- 11Mi hendrik  6 Aug 15:51 build/release
.rwxr----- 11Mi hendrik 31 Jul 17:00 build/release-master

Why does it even matter?

I have the following alias set up: ll='exa --binary --all --git --group-directories-first --long'. This allows me to just use ll in the general case, and then use ll --binary when I want the details. That worked perfectly up until v0.23.4, but stopped working in v0.23.5.

Activity

  1. fzlzjerry commented on Aug 10, 2026

    @fzlzjerry

    I can reproduce this on main. The v0.23.5 clap migration lost v0.23.4's last-option-wins behavior: --binary --bytes currently stays in binary mode because the size format deduction checks binary first.

    I have a fix that makes the two flags override each other in argument order, with regression coverage for both long options and clustered short options. I'll send a PR once the full checks finish.

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: bugSomething isn't working as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions