Coder Social home page Coder Social logo

jaredyam / colorls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from athityakumar/colorls

0.0 0.0 0.0 37.04 MB

A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. :tada:

License: MIT License

Ruby 99.60% Shell 0.40%

colorls's Introduction

Color LS

forthebadge forthebadge

Gem Version CI PRs Welcome

A Ruby script that colorizes the ls output with color and icons.


This package is a third party modified version of athityakumar/colorls. If you are new babies to this command-line tool, consider reading the detailed instructions in the original repo before going ahead.

What’s NEW?

  • 2022-02-23: Update tree view
  • 2020-09-05: Add a new feature for customizing the color of different kind of files
  • 2020-09-05: Fix the bug which causes failure to colorize and count unrecognized files

Installation

git clone https://github.com/jaredyam/colorls.git
cd colorls

# Install ruby >= 2.5.0
sudo add-apt-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.6 ruby2.6-dev

# Install bundler
gem install bundler
bundle install

# Install colorls
gem build colorls
gem install --local *.gem

Customization

Suppose you are going to use dark_colors.yaml as your default color scheme. To customize the filename color of certain extensions you want to highlight:

cd ~/.config/colorls
# Initialize a default color scheme configuration if you don't have it yet.
cp $(dirname $(gem which colorls))/yaml/dark_colors.yaml .
# Open the configuration with your favorite editor
subl dark_colors.yaml

# Set your custom color scheme of filenames of different extensions
py:        gold
md:        pink
pdf:       indianred
...

Aliases and functions

The following shell aliases and functions are recommended to use together with colorls:

alias ls="colorls --light --sort-dirs --report --dark"
alias lc='colorls -lA --sd'

function tree() {
  if [ "$1" -eq -1 ]; then
    colorls --tree
  else
    colorls --tree="${1:-1}"
  fi
}

function cd() {
  builtin cd "$1"
  tree
}

colorls's People

Contributors

avdv avatar athityakumar avatar dependabot-preview[bot] avatar dependabot[bot] avatar dependabot-support avatar rohitner avatar henrebotha avatar jaredyam avatar gladoskar avatar t-mangoe avatar adimasuhid avatar igordcsouza avatar alexpjohnson avatar lewazo avatar alexanderarvidsson avatar ryanoasis avatar kaustubhhiware avatar bigpick avatar technologyclassroom avatar mccarths avatar redcinelli avatar mariuz avatar pranitbauva1997 avatar rjhilgefort avatar sl avatar sumbach avatar kartsims avatar swentling87 avatar vfonic avatar trivett avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.