![]() | 1 alexrezit 2014-01-05 15:44:55 +08:00 $ alias l alias l='ls -FG' |
![]() | 2 kqz901002 2014-01-05 15:45:07 +08:00 ![]() bash的话 export CLICOLOR=1 export GREP_OPTIOnS="--color=auto" 这样就可以 zsh得像楼主这样 |
![]() | 3 Livid MOD OP PRO |
![]() | 5 kqz901002 2014-01-05 15:48:55 +08:00 @Livid 这样啊,可能跟colorscheme有关系, http://equation85.github.io/blog/customize-terminal-on-mac/ |
![]() | 6 kqz901002 2014-01-05 15:49:59 +08:00 |
7 jasontse 2014-01-05 15:52:20 +08:00 via iPad Linux bash 我是这么做的 export LS_OPTIOnS='--color=auto' alias ls='ls $LS_OPTIONS' tree 也会有高亮 |
![]() | 8 bigclean 2014-01-05 16:03:34 +08:00 可以使用 gnu coreuils 中的 ls 替代 bsd ls,其支持 dircolors,搭配 solarized 主题(https://github.com/seebi/dircolors-solarized/)使用非常方便。 |
9 duoxing 2014-01-05 16:12:48 +08:00 添加了之后,ls确实有颜色了,但是对目录的颜色不是很满意,在什么地方可以改呢? |
10 duoxing 2014-01-05 16:15:19 +08:00 好了,知道在什么地方改了,改好了,谢谢,请忽略上面那条 |
![]() | 12 Owenjia 2014-01-05 16:21:22 +08:00 https://github.com/seebi/dircolors-solarized ls的话,我用的这个~~ |
![]() | 13 leebo 2014-01-05 17:31:18 +08:00 oh my zsh 哈哈 肯定有人会说这个吧 |
![]() | 14 hackevin 2014-01-05 20:33:25 +08:00 drwxr-xr-x+ 5 hackevin staff 170 [2013-12-21 22:15] Public/ drwx------+ 3 hackevin staff 102 [2013-12-21 22:15] Movies/ ----------------------------------------------------------------- [hackevin.iNULLMBA] $ bash --version GNU bash, version 4.3.0(1)-rc1 (x86_64-apple-darwin13.0.0) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. [hackevin.iNULLMBA] $ brew install coreutils [hackevin.iNULLMBA] $ cat .profile export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" alias ls='ls -F -rt --color=auto --time-style=+"[%Y-%m-%d %H:%M]"' |
![]() | 15 kqz901002 2014-01-05 21:45:56 +08:00 @hackevin ~ bash --version GNU bash, 版本 4.2.45(2)-release (i386-apple-darwin13.0.2) Copyright (C) 2011 Free Software Foundation, Inc. 许可证 GPLv3+: GNU GPL 许可证版本3或者更高 <http://gnu.org/licenses/gpl.html> 这是自由软件,您可以自由地更改和重新发布。 在法律允许的范围内没有担保. 竟然是中文的 吓尿我了 |
![]() | 17 kevinroot 2014-01-05 23:24:02 +08:00 用的zsh自带的主题:robbyrussell.zsh-theme看着挺舒服的的 |
![]() | 18 dorentus 2014-01-05 23:49:44 +08:00 > export CLICOLOR=1 之后就有颜色了吧,LSCOLORS 似乎是用来设置颜色的? @hackevin 你的 bash 是自己装的?怎么版本这么高…… 我的 OS X 10.9.1 (13B42) 自带的 /bin/bash 才是 3.2.51: > GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13) > Copyright (C) 2007 Free Software Foundation, Inc. homebrew 带的 bash stable 也只是 4.2.45 而已啊…… |
![]() | 19 jokefun 2014-01-06 00:58:34 +08:00 ![]() LSCOLORS Generator: http://geoff.greer.fm/lscolors/ |
![]() | 21 winsyka 2014-01-06 11:43:16 +08:00 ls -G 就可以显示颜色。 |
![]() | 22 TankyWoo 2014-01-06 13:44:34 +08:00 mac os 下 我记得是 alias ls="ls -G" 就可以了 另外,配合zsh,控制不同后缀文件显示不同颜色: https://github.com/tankywoo/dotfiles/blob/master/tanky.zsh-theme |