diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e299ef1..5912dbe 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0'] + ruby-version: ['2.6', '2.7', '3.0', '3.1'] os: [ubuntu-latest, macos-latest] steps: diff --git a/.rubocop.yml b/.rubocop.yml index ee5bc77..19b7d95 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,7 +10,7 @@ AllCops: - 'profile/*' DisplayCopNames: true NewCops: enable - TargetRubyVersion: 2.5 + TargetRubyVersion: 2.6 # Preferred codebase style --------------------------------------------- diff --git a/README.md b/README.md index e4a532e..d1c3b60 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Man pages have been added. Checkout `man colorls`. [(Back to top)](#table-of-contents) -1. Install Ruby (preferably, version >= 2.5) +1. Install Ruby (preferably, version >= 2.6) 2. [Download](https://www.nerdfonts.com/font-downloads) and install a Nerd Font. Have a look at the [Nerd Font README](https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md) for installation instructions. *Note for `iTerm2` users - Please enable the Nerd Font at iTerm2 > Preferences > Profiles > Text > Non-ASCII font > Hack Regular Nerd Font Complete.* diff --git a/colorls.gemspec b/colorls.gemspec index 102713f..61384c2 100644 --- a/colorls.gemspec +++ b/colorls.gemspec @@ -47,7 +47,7 @@ Gem::Specification.new do |spec| spec.homepage = 'https://github.com/athityakumar/colorls' spec.license = 'MIT' - spec.required_ruby_version = '>= 2.5.0' + spec.required_ruby_version = '>= 2.6.0' spec.files = IO.popen( %w[git ls-files -z], external_encoding: Encoding::ASCII_8BIT diff --git a/lib/colorls/core.rb b/lib/colorls/core.rb index aea56d6..0fecb2c 100644 --- a/lib/colorls/core.rb +++ b/lib/colorls/core.rb @@ -321,7 +321,7 @@ module ColorLS 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..-1].to_i(16)].pack('U') } + 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 += content.directory? && @indicator_style != 'none' ? '/' : ' '