GRAYBYTE WORDPRESS FILE MANAGER9332

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby30/share/ruby/reline/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby30/share/ruby/reline//key_stroke.rb
class Reline::KeyStroke
  using Module.new {
    refine Array do
      def start_with?(other)
        other.size <= size && other == self.take(other.size)
      end

      def bytes
        self
      end
    end
  }

  def initialize(config)
    @config = config
  end

  def match_status(input)
    key_mapping.keys.select { |lhs|
      lhs.start_with? input
    }.tap { |it|
      return :matched  if it.size == 1 && (it.max_by(&:size)&.size&.== input.size)
      return :matching if it.size == 1 && (it.max_by(&:size)&.size&.!= input.size)
      return :matched  if it.max_by(&:size)&.size&.< input.size
      return :matching if it.size > 1
    }
    key_mapping.keys.select { |lhs|
      input.start_with? lhs
    }.tap { |it|
      return it.size > 0 ? :matched : :unmatched
    }
  end

  def expand(input)
    lhs = key_mapping.keys.select { |item| input.start_with? item }.sort_by(&:size).reverse.first
    return input unless lhs
    rhs = key_mapping[lhs]

    case rhs
    when String
      rhs_bytes = rhs.bytes
      expand(expand(rhs_bytes) + expand(input.drop(lhs.size)))
    when Symbol
      [rhs] + expand(input.drop(lhs.size))
    when Array
      rhs
    end
  end

  private

  def key_mapping
    @config.key_bindings
  end
end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 17 2024 08:38:31
root / linksafe
0755
key_actor
--
July 17 2024 08:38:23
root / linksafe
0755
unicode
--
July 17 2024 08:38:23
root / linksafe
0755
ansi.rb
6.132 KB
June 26 2024 13:55:18
root / linksafe
0644
config.rb
8.659 KB
June 26 2024 13:55:18
root / linksafe
0644
general_io.rb
1.229 KB
June 26 2024 13:55:18
root / linksafe
0644
history.rb
1.869 KB
June 26 2024 13:55:18
root / linksafe
0644
key_actor.rb
0.165 KB
June 26 2024 13:55:18
root / linksafe
0644
key_stroke.rb
1.223 KB
June 26 2024 13:55:18
root / linksafe
0644
kill_ring.rb
2.386 KB
June 26 2024 13:55:18
root / linksafe
0644
line_editor.rb
90.824 KB
June 26 2024 13:55:18
root / linksafe
0644
unicode.rb
19.582 KB
June 26 2024 13:55:18
root / linksafe
0644
version.rb
0.037 KB
June 26 2024 13:55:18
root / linksafe
0644
windows.rb
10.376 KB
June 26 2024 13:55:18
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF