Skip to content

Commit

Permalink
Refactor hyperlink handling in fetch_string
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Apr 13, 2022
1 parent b8589c3 commit 0c6928d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/colorls/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ def fetch_string(content, key, color, increment)
@count[increment] += 1
value = increment == :folders ? @folders[key] : @files[key]
logo = value.gsub(/\\u[\da-f]{4}/i) { |m| [m[-4..].to_i(16)].pack('U') }
name = content.show
name = make_link(content) if @hyperlink
name = @hyperlink ? make_link(content) : content.show
name += content.directory? && @indicator_style != 'none' ? '/' : ' '
entry = "#{out_encode(logo)} #{out_encode(name)}"
entry = entry.bright if !content.directory? && content.executable?
Expand Down

0 comments on commit 0c6928d

Please # to comment.