sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
14.02k stars 4.49k forks source link

error when `ls` is aliased to `lsd`. #2054

Closed justinabrahms closed 1 year ago

justinabrahms commented 1 year ago

Description

If you have lsd installed (https://github.com/lsd-rs/lsd) as an alias to ls, prezto complains because -G isn't a valid option for it. It is GNU ls compatible, but isn't detected correctly at https://github.com/sorin-ionescu/prezto/blob/master/modules/utility/init.zsh#L79

Expected behavior

ls to work as normally.

Actual behavior

error: Found argument '-G' which wasn't expected, or isn't valid in this context

    If you tried to supply `-G` as a value rather than a flag, use `-- -G`

USAGE:
    lsd [OPTIONS] [--] [FILE]...

For more information try --help

Steps to Reproduce

  1. install lsd
  2. alias ls=lsd
  3. make a new shell
  4. type ls

Versions