Colorls – A Ruby script that beautifies the terminal's ls command
github.com
github.com
But as someone who lives in the terminal, it's not something I would use at all. To me, the fancy fontawesome glyphs PLUS the colors are information overload [1]. It really feels like overkill. I'm not trying to discourage anyone (including the author) from writing these things, and clearly the author is a very good programmer.
If it was an exercise in making something beautiful in the terminal, then the author succeeded in this endeavor. Making a good looking, consistent terminal UI is ridiculously difficult, and each column is pretty and formatted. This program feels like it has had a lot of TLC. Honestly, I hope the author continues to make cool programs in the terminal; they clearly have a knack for it :)
As a minor aside, maybe consider changing the executable name from `lc` to something else; it conflicts with the `lc` executable for Mono (at least on Arch[2], and Ubuntu[3]). But that's just a minor nitpick.
[1] this is my opinion, I want to make this as clear as possible
[2] https://www.archlinux.org/packages/extra/i686/mono/files/
[3] http://manpages.ubuntu.com/manpages/trusty/man1/lc.1.html
For those interested, there are pre-existing dircolors config files that people have shared, like dircolors-solarized[1].
Of course, the OP's program does more than just ls, in that it has icons and a `--report` flag.
That aside, this is not my cup of tea (I prefer dired, and don't mind the lack of icons, tho they might've been a nice ornament), but yet it looks nice, kudos. But colour me not if [ x$TERM = xdumb ].
alias ls="ls -GF"
export LSCOLORS="Exfxcxdxbxegedabagacad"
-G Enables colorized output-F Display a slash (`/') immediately after each pathname that is a directory, an asterisk (`*') after each that is executable, an at sign (`@') after each symbolic link, an equals sign (`=') after each socket, a percent sign (`%') after each whiteout, and a vertical bar (`|') after each that is a FIFO.
The filename/dirname is colored and the character denoting the type is not colored, so I can tell what is part of a name and what denotes the file type.
I don't have that problem, but I don't see any problem including redundancy. I have come to like Powerline-hs's git support because even if I only half-glimpse a window I immediately know the status of the repo from it just by the colors. I don't see why I wouldn't want to maximize the channels of information coming back to me.
[user@hostname:path](git branch)$
There are colours highlighting these sections. What I'm referring to is the multi-line prompts with dates, times, uptimes etc that surely just clutter up the history view?
0[~/.../a/folder]$ false
1[~/.../a/folder]$
In my .bashrc: PROMPT_DIRTRIM=2
PS1='\[\e]2;[\W]\$\a\]$(printf "%d" $?)[\w]\$ 'Feel free to share your thoughts here : https://github.com/athityakumar/colorls/issues/33
will get you colors in macOS. I'm sure a lot of people will like the icons but they're not for me. Around last year I got burned out on things nagging for my attention by bouncing, booping, turning red, popping up a pretty picture. Turning off all notifications on my phone was a good first step.
おまけ:
Here is the "ultimate" OSX ls that I found on the internet some time ago:
alias l="ls -aeGhlO@"
Of course that is too much information sometimes, so I kept a vanilla ls too:
alias ls="ls -aG"
alias ls='/bin/ls -hlFA --color=auto'
which also displays `/` at the end of dirs, `*` for executables and so on.Me speaka the 和語 too, but no need to show off. Just say "bonus:", it's an english language site.
That said, thanks for the tips!
Very cool. Definitely using this for some of my CLI tools.
Personally I find many different colors confusing. I've a wrapper script that highlights permissions etc. rather than using colors to distinguish them. It also makes the output of ls consistent across linux/osx/solaris/... which it does by adjusting the output from the existing ls implementations on each platform
> Here are the screenshots of working example on an iTerm2 terminal (Mac OS), oh-my-zsh with powerlevel9k theme and powerline nerd-font + awesome-config font with the Solarized Dark color theme.
export LS_COLORS='di=01;34m \033'
this is only for directories but... you got the idea.Here's what `time ls` and `time lc` produced, in a directory with 517 files:
> ls --color=tty -l 0.01s user 0.00s system 93% cpu 0.007 total
> ~/.gem/ruby/2.4.0/bin/lc 0.14s user 0.01s system 98% cpu 0.159 total
It's definitely noticeable, especially if you use `ls` day-in, day-out. But it's nothing debilitating.
I played with it on the day they released Ruby 2.3. It's not meant for distributing code across machines and it could fail on the same machine after some updates. It's probably not worth it to shave 152 ms on an interactive command.
Also internal bookkeeping done by the terminal is probably going to limit how much command speed matter, e.g. word/line wrapping: https://stackoverflow.com/questions/21947452/why-is-printing...