prezto: ls: illegal option -- -
I have issue using ls
command mostly in tmux but It happen sometimes in regular terminal session.
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
❯❯❯ zsh --version
zsh --version
zsh 5.1 (x86_64-apple-darwin14.5.0)
❯❯❯ which ls ⏎
which ls
ls: aliased to ls --group-directories-first --color=auto
I’m using OSX 10.10.5 and iTterm2 Build 2.9.20150905-nightly but I do not thing that issue is related to terminal emulator.
Thanks for any help.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 15
Commits related to this issue
- Add gnu-utillity before utility See https://github.com/sorin-ionescu/prezto/issues/966#issuecomment-139619061 — committed to herder/dotfiles-1 by herder 6 years ago
- Ensure correct 'ls' module loaded. See: https://github.com/sorin-ionescu/prezto/issues/966 Adding the gnu-utility module before utility, resolves a name conflict with recent brew-installed coreutils... — committed to blake-education/prezto by otherchirps 5 years ago
- avoid `ls: illegal option -- -` Under certain configurations with coreutils installed via brew, you may see this in shells started inside tmux: ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWa... — committed to nandalopes/dotfiles by pdehlke 3 years ago
For reference:
brew install coreutils export PATH=“/usr/local/opt/coreutils/libexec/gnubin:$PATH”
RESOLVED
I have to replace old:
with new:
THX again
Just checked brew info and found this:
This should work for ZSH/prezto as well. Can you try this and let me know how it goes? 😃
Just bumped into this one in the future, installing coreutils and adding it to the
PATH
resolved the issue.I was having this problem but I just found out the solution. On your
.zpreztorc
file, the one where you load the modules, just load thegnu-utility
before theutility
module 😃Thanks. That worked!
The problem is in condition
modules/utilitity/init.zsh
modules/helper/init.zsh
In my case this should return
false
but return true instead. I can fix it with redefinig ls alias in my.zshrc
file for now.@turboMaCk I’m guessing you installed
coreutils
package via brew? If that’s the case, remove the coreutils package and install it again using the following option:Then load the
gnu-utility
package on your prezto and see if that works. 😃