module Colorls::Styler

Defined in:

colorls/styler.cr

Constant Summary

COLORS = {"default" => :default, "black" => :black, "red" => :red, "green" => :green, "yellow" => :yellow, "blue" => :blue, "magenta" => :magenta, "cyan" => :cyan, "light_gray" => :light_gray, "dark_gray" => :dark_gray, "light_red" => :light_red, "light_green" => :light_green, "light_yellow" => :light_yellow, "light_blue" => :light_blue, "light_magenta" => :light_magenta, "light_cyan" => :light_cyan, "white" => :white}

I have to map these, because we can't dynamically create a Symbol and a Symbol is required by Colorizer

Class Method Summary

Class Method Detail

def self.color(file : NamedTuple) : Symbol #

Output colors are based on the file type and are limited to the colors supported by Colorize


[View source]
def self.config #

Maybe do these as file types later


[View source]
def self.config_file #

Look for a configuration file:

  • In the current directory (for overrides)
  • In the preferred configuration location
  • In the root of the users ~ directory

[View source]
def self.filename(file : NamedTuple) : Colorize::Object #

[View source]
def self.icon(file : NamedTuple) : Colorize::Object #

[View source]
def self.long_filename(file : NamedTuple) : Colorize::Object #

[View source]