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.
The problem is in condition
if is-callable 'dircolors'; then
modules/utilitity/init.zsh
function is-callable {
(( $+commands[$1] )) || (( $+functions[$1] )) || (( $+aliases[$1] ))
}
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.
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 the gnu-utility before the utility module :)
@filipekiss this doesn't work for me:(
@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:
brew install coreutils - - default-names
Then load the gnu-utility package on your prezto and see if that works. :)
@filipekiss Yeah! It works now. Thanks a lot man.
I ran into this again on my new machine. brew install coreutils - - default-names does not work for me now and brew install coreutils --with-default-names do not fix this issue. Any idea?
Just checked brew info and found this:
==> Caveats
All commands have been installed with the prefix 'g'.If you really need to use these commands with their normal names, you
can add agnubindirectory to your PATH from yourbashrclike:
PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"Additionally, you can access their man pages with normal names if you add
thegnumandirectory to your MANPATH from yourbashrcas well:
MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
This should work for ZSH/prezto as well. Can you try this and let me know how it goes? :)
Sound reasonable. I had not much time look at this right now (working hard to finish sprint). But I definitely look at this later and post solution in here for a record. THX for your advice. I see the same guid when running brew info coreutils so I believe that this should fix this issue.
No problem! Let me know how this goes. :)
On Fri, Jan 15, 2016 at 2:17 PM Marek Fajkus [email protected]
wrote:
Sound reasonable. I had not much time look at this right now (working hard
to finish sprint). But I definitely look at this later and post solution in
here for a record. THX for your advice. I see the same guid when running brew
info coreutils so I believe that this should fix this issue.—
Reply to this email directly or view it on GitHub
https://github.com/sorin-ionescu/prezto/issues/966#issuecomment-172004239
.
Filipe Kiss
————————
+55 11 972-417-669
[email protected]
www.filipekiss.com.br
RESOLVED
I have to replace old:
export PATH="$PATH:$(brew --prefix coreutils)/libexec/gnubin"
with new:
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
THX again
Just bumped into this one in the future, installing coreutils and adding it to the PATH resolved the issue.
For reference:
brew install coreutils
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
For reference:
brew install coreutils
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
Thanks. That worked!
For reference:
brew install coreutils
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"Thanks. That worked!
Thanks. That worked! (I had the same issue after reinstalling brew and I forgot I already have found the solution - don't judge me!).
Most helpful comment
RESOLVED
I have to replace old:
with new:
THX again