File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env ruby
2
2
# frozen_string_literal: true
3
3
4
+ # workaround https://github.com/rubygems/rubygems/issues/3087
5
+
6
+ # rubocop:disable Style/GlobalVars
7
+ $loading = true
8
+
9
+ class Dir
10
+ @@old_pwd = singleton_method ( :pwd ) # rubocop:disable Style/ClassVars
11
+
12
+ def self . pwd
13
+ @@old_pwd . call
14
+ rescue Errno ::ENOENT => e
15
+ return '/' if $loading
16
+
17
+ raise e
18
+ end
19
+ end
20
+
4
21
require 'colorls'
5
22
23
+ $loading = false
24
+ # rubocop:enable Style/GlobalVars
25
+
6
26
ColorLS ::Flags . new ( *ARGV ) . process
7
- true
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def initialize(*args)
39
39
def process
40
40
init_locale
41
41
42
- @args = [ Dir . pwd ] if @args . empty?
42
+ @args = [ '.' ] if @args . empty?
43
43
@args . sort! . each_with_index do |path , i |
44
44
next STDERR . puts "\n Specified path '#{ path } ' doesn't exist." . colorize ( :red ) unless File . exist? ( path )
45
45
Original file line number Diff line number Diff line change 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" "April 2020" "colorls 1.3.3 " "colorls Manual"
4
+ .TH "COLORLS" "1" "April 2020" "colorls 1.4.0 " "colorls Manual"
5
5
.
6
6
.SH "NAME"
7
7
\fB colorls \fR \- list directory contents with colors and icons
You can’t perform that action at this time.
0 commit comments