colorls 1.5.0 → 1.5.1.pre.276
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/lib/colorls/core.rb +24 -11
- data/lib/colorls/fileinfo.rb +4 -0
- data/lib/yaml/dark_colors.yaml +5 -3
- data/lib/yaml/file_aliases.yaml +6 -0
- data/lib/yaml/files.yaml +1 -0
- data/lib/yaml/light_colors.yaml +5 -3
- data/man/colorls.1 +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d95e56eb28ca5d8974477820fc782d64219fc47ca6820d66d80e37984caf7cb
|
4
|
+
data.tar.gz: 43d1cef5e4fe48019f427dcb83f95d6979127b1a6f8cc2643c4e57c2892a5c14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af313606d307b45e2ab507a02c15e46085ad5e30834ac20fac82e3d4bffdd3f5c89181fcff9aea294f96cc45c4c67262cf4ba99a6f6bd8bd99caf9f37248459
|
7
|
+
data.tar.gz: 1595b26e62b0909b435b9903fcce3786a53cd83adee89e8fb1bdf276585f55f20f81ee74d6dbcb5b9bafa4ce039c6fd736c98d3e4fb296d4e2ed45e3e18d6ef9
|
data/README.md
CHANGED
@@ -22,9 +22,9 @@ A Ruby script that colorizes the `ls` output with color and icons. Here are the
|
|
22
22
|
- `-A` (or) `--almost-all`
|
23
23
|
- `-d` (or) `--dirs`
|
24
24
|
- `-f` (or) `--files`
|
25
|
-
-
|
25
|
+
- `--help`
|
26
26
|
- `-l` (or) `--long`
|
27
|
-
-
|
27
|
+
- `--report`
|
28
28
|
- `--tree` (or) `--tree=[DEPTH]`
|
29
29
|
- `--gs` (or) `--git-status`
|
30
30
|
- `--sd` (or) `--sort-dirs` or `--group-directories-first`
|
@@ -67,7 +67,7 @@ Man pages have been added. Checkout `man colorls`.
|
|
67
67
|
|
68
68
|
![image](https://user-images.githubusercontent.com/17109060/32149065-5a27c9d4-bd25-11e7-9a2b-fd731d76a058.png)
|
69
69
|
|
70
|
-
- With
|
70
|
+
- With `--help` : Prints a very helpful help menu
|
71
71
|
|
72
72
|
![image](https://user-images.githubusercontent.com/17109060/32149096-cf2cf5b0-bd25-11e7-84b6-909d79099c98.png)
|
73
73
|
|
@@ -75,7 +75,7 @@ Man pages have been added. Checkout `man colorls`.
|
|
75
75
|
|
76
76
|
![image](https://user-images.githubusercontent.com/17109060/32149049-2a63ae48-bd25-11e7-943c-5ceed25bd693.png)
|
77
77
|
|
78
|
-
- With
|
78
|
+
- With `--report` : Shows brief report about number of files and folders shown
|
79
79
|
|
80
80
|
![image](https://user-images.githubusercontent.com/17109060/32149082-96a83fec-bd25-11e7-9081-7f77e4c90e90.png)
|
81
81
|
|
@@ -174,6 +174,14 @@ You can overwrite the existing icons and colors mapping by copying the yaml file
|
|
174
174
|
|
175
175
|
Let's say that you're using the dark color scheme and would like to change the color of untracked file (`??`) in the `--git-status` flag to yellow. Copy the defaut `dark_colors.yaml` and change it.
|
176
176
|
|
177
|
+
Check if the `~/.config/colorls` directory exists. If it doesn't exist, create it using the following command:
|
178
|
+
|
179
|
+
```sh
|
180
|
+
mkdir -p ~/.config/colorls
|
181
|
+
```
|
182
|
+
|
183
|
+
And then
|
184
|
+
|
177
185
|
```sh
|
178
186
|
cp $(dirname $(gem which colorls))/yaml/dark_colors.yaml ~/.config/colorls/dark_colors.yaml
|
179
187
|
```
|
data/lib/colorls/core.rb
CHANGED
@@ -407,6 +407,7 @@ module ColorLS
|
|
407
407
|
when file.blockdev? then :blockdev
|
408
408
|
when file.socket? then :socket
|
409
409
|
when file.executable? then :executable_file
|
410
|
+
when file.hidden? then :hidden
|
410
411
|
when @files.key?(key) then :recognized_file
|
411
412
|
else :unrecognized_file
|
412
413
|
end
|
@@ -415,20 +416,32 @@ module ColorLS
|
|
415
416
|
|
416
417
|
def options(content)
|
417
418
|
if content.directory?
|
418
|
-
key
|
419
|
-
key = @folder_aliases[key] unless @folders.key? key
|
420
|
-
key = :folder if key.nil?
|
421
|
-
color = @colors[:dir]
|
422
|
-
group = :folders
|
419
|
+
options_directory(content).values_at(:key, :color, :group)
|
423
420
|
else
|
424
|
-
|
425
|
-
key = @file_aliases[key] unless @files.key? key
|
426
|
-
color = file_color(content, key)
|
427
|
-
group = @files.key?(key) ? :recognized_files : :unrecognized_files
|
428
|
-
key = :file if key.nil?
|
421
|
+
options_file(content).values_at(:key, :color, :group)
|
429
422
|
end
|
423
|
+
end
|
424
|
+
|
425
|
+
def options_directory(content)
|
426
|
+
key = content.name.downcase.to_sym
|
427
|
+
key = @folder_aliases[key] unless @folders.key?(key)
|
428
|
+
key = :folder if key.nil?
|
429
|
+
|
430
|
+
color = content.hidden? ? @colors[:hidden_dir] : @colors[:dir]
|
431
|
+
|
432
|
+
{key: key, color: color, group: :folders}
|
433
|
+
end
|
434
|
+
|
435
|
+
def options_file(content)
|
436
|
+
key = File.extname(content.name).delete_prefix('.').downcase.to_sym
|
437
|
+
key = @file_aliases[key] unless @files.key?(key)
|
438
|
+
|
439
|
+
color = file_color(content, key)
|
440
|
+
group = @files.key?(key) ? :recognized_files : :unrecognized_files
|
441
|
+
|
442
|
+
key = :file if key.nil?
|
430
443
|
|
431
|
-
|
444
|
+
{key: key, color: color, group: group}
|
432
445
|
end
|
433
446
|
|
434
447
|
def tree_contents(path)
|
data/lib/colorls/fileinfo.rb
CHANGED
data/lib/yaml/dark_colors.yaml
CHANGED
data/lib/yaml/file_aliases.yaml
CHANGED
@@ -6,6 +6,7 @@ flac: audio
|
|
6
6
|
m4a: audio
|
7
7
|
mp3: audio
|
8
8
|
ogg: audio
|
9
|
+
opus: audio
|
9
10
|
wav: audio
|
10
11
|
editorconfig: conf
|
11
12
|
scss: css
|
@@ -23,11 +24,14 @@ gitconfig: git
|
|
23
24
|
gitignore: git
|
24
25
|
gitignore_global: git
|
25
26
|
lhs: hs
|
27
|
+
avif: image
|
26
28
|
bmp: image
|
27
29
|
gif: image
|
30
|
+
heif: image
|
28
31
|
ico: image
|
29
32
|
jpeg: image
|
30
33
|
jpg: image
|
34
|
+
jxl: image
|
31
35
|
odg: image
|
32
36
|
png: image
|
33
37
|
pxm: image
|
@@ -88,7 +92,9 @@ ods: xls
|
|
88
92
|
xlsx: xls
|
89
93
|
xul: xml
|
90
94
|
yaml: yml
|
95
|
+
7z: zip
|
91
96
|
gz: zip
|
92
97
|
rar: zip
|
93
98
|
tar: zip
|
94
99
|
tgz: zip
|
100
|
+
xz: zip
|
data/lib/yaml/files.yaml
CHANGED
data/lib/yaml/light_colors.yaml
CHANGED
@@ -9,9 +9,11 @@ dead_link: red
|
|
9
9
|
link: cyan
|
10
10
|
|
11
11
|
# special files
|
12
|
-
socket:
|
13
|
-
blockdev:
|
14
|
-
chardev:
|
12
|
+
socket: darkgray
|
13
|
+
blockdev: darkgray
|
14
|
+
chardev: darkgray
|
15
|
+
hidden: seagreen
|
16
|
+
hidden_dir: royalblue
|
15
17
|
|
16
18
|
# Access Modes
|
17
19
|
write: red
|
data/man/colorls.1
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "COLORLS" "1" "
|
4
|
+
.TH "COLORLS" "1" "July 2024" "colorls 1.5.0" "colorls Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBcolorls\fR \- list directory contents with colors and icons
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colorls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1.pre.276
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Athitya Kumar
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -302,7 +302,7 @@ dependencies:
|
|
302
302
|
- - "~>"
|
303
303
|
- !ruby/object:Gem::Version
|
304
304
|
version: 0.22.0
|
305
|
-
description:
|
305
|
+
description:
|
306
306
|
email:
|
307
307
|
- athityakumar@gmail.com
|
308
308
|
executables:
|
@@ -378,12 +378,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
378
378
|
version: 2.6.0
|
379
379
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
380
380
|
requirements:
|
381
|
-
- - "
|
381
|
+
- - ">"
|
382
382
|
- !ruby/object:Gem::Version
|
383
|
-
version:
|
383
|
+
version: 1.3.1
|
384
384
|
requirements: []
|
385
|
-
rubygems_version: 3.
|
386
|
-
signing_key:
|
385
|
+
rubygems_version: 3.3.27
|
386
|
+
signing_key:
|
387
387
|
specification_version: 4
|
388
388
|
summary: A Ruby CLI gem that beautifies the terminal's ls command, with color and
|
389
389
|
font-awesome icons.
|