plugin-grc icon indicating copy to clipboard operation
plugin-grc copied to clipboard

ls breaks on mac OS X

Open abhigenie92 opened this issue 7 years ago • 2 comments

set -U grcplugin_ls --color -l

causes


ls                                                                  22:54:13
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

abhigenie92 avatar Jan 30 '18 03:01 abhigenie92

A Work Around

add an alias for ls

alias ls='grc ls'

edheltzel avatar Apr 05 '19 13:04 edheltzel

Hi @abhigenie92 , it breaks because ls in OS X is the BSD implementation. It does not have the GNU CoreUtils version of ls command which has the command line options --color. In Mac OS X you have to pass the -G options, which is the --color equivalent for BSD ls implementation.

In this case you should use:

$> set --universal grcplugin_ls -G

If you want to use the other option -l as in your example you can put them together:

$> set --universal grcplugin_ls -lG

pantuza avatar Aug 24 '20 22:08 pantuza