rtfm-filemanager 6.0.12 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rtfm +20 -5
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f23c3145187f23f9fe272f2c71d8800994d9da6cecd7469076848114235d73ee
4
- data.tar.gz: 8e3c2cdfffd409ce6f0ceb5096bf5f1ac93ac70e054e8900d1ac3babd333d83c
3
+ metadata.gz: d089d1bfe95a340e6979a12e7a1cdf648218b2089a761198e48495927b6c397b
4
+ data.tar.gz: 2a728824fe81ad20c8dca96e586c8ad70a0b98896753f42984bd696b5aef03b0
5
5
  SHA512:
6
- metadata.gz: 62d243203be50d5e9f42b87781a0b2da754286022c97f6fb1119059c97c750ca90147a361e938d572bfca3cf5ef4ba80b14bd0fbf1b864778d247dde51255740
7
- data.tar.gz: 0e7819b401b9173ca52ac69e3c8eca6c1d11072f5d60e2ac631877546f09ab4fcd58a45951b648f178a601a39bff01dc143bafb7015710c0720ad43f21c5106f
6
+ metadata.gz: 52f5ebc86450d31acd054e136ff3acee035602de7f19549f54cb3290ddd36c5ee9361a34e5147deb7bdbfcee56bfb653491c221cf8b10c20afaa883860249c19
7
+ data.tar.gz: 65b034c640c804d40c8ed17a1d37ee5b759524c9f3407e1d73ac9892842a4e8280977df30f1ef2e6e94d3515ef130c6ede8a3b096bc37738b70f23287c08a870
data/bin/rtfm CHANGED
@@ -18,7 +18,7 @@
18
18
  # get a great understanding of the code itself by simply sending
19
19
  # or pasting this whole file into you favorite AI for coding with
20
20
  # a prompt like this: "Help me understand every part of this code".
21
- @version = '6.0.12' # Fixed terminal state issue causing multiple keypresses in VIM
21
+ @version = '7.0.1' # Re-enabled directory caching for major performance improvement
22
22
 
23
23
  # SAVE & STORE TERMINAL {{{1
24
24
  ORIG_STTY = `stty -g`.chomp
@@ -501,6 +501,9 @@ $stdin.set_encoding(Encoding::UTF_8)
501
501
  @metadata_cache = {}
502
502
  @metadata_cache_size = 0
503
503
  @max_metadata_entries = 100
504
+ @command_cache = {} # Cache for expensive shell commands
505
+ @command_cache_size = 0
506
+ @max_command_cache = 50
504
507
 
505
508
  # INITIALIZE VARIABLES {{{1
506
509
  ## These can be set by user in ~/.rtfm/conf
@@ -4213,8 +4216,17 @@ end
4213
4216
 
4214
4217
  # GENERIC FUNCTIONS {{{1
4215
4218
  def get_cached_dirlist(dir, ls_options) # {{{2
4216
- # Directory caching disabled for stability
4217
- return nil
4219
+ # Generate cache key with directory mtime for automatic invalidation
4220
+ begin
4221
+ dir_mtime = File.mtime(dir).to_i
4222
+ cache_key = "#{dir}:#{ls_options}:#{dir_mtime}"
4223
+ rescue
4224
+ return nil # Can't cache if we can't get mtime
4225
+ end
4226
+
4227
+ # Return cached result if available and fresh
4228
+ cached = @dir_cache[cache_key]
4229
+ return cached if cached
4218
4230
 
4219
4231
  # Clean old cache entries if cache is getting too large
4220
4232
  if @dir_cache_size >= @max_cache_entries
@@ -4228,11 +4240,11 @@ def get_cached_dirlist(dir, ls_options) # {{{2
4228
4240
  colorls = command("ls --color #{Shellwords.escape(dir)} #{ls_options} #{@lslong}").split("\n")
4229
4241
 
4230
4242
  result = { purels: purels, colorls: colorls }
4231
- @dir_cache[cache_with_time] = result
4243
+ @dir_cache[cache_key] = result
4232
4244
  @dir_cache_size += 1
4233
4245
 
4234
4246
  # Clean up old entries for this directory
4235
- @dir_cache.delete_if { |key, _| key.start_with?("#{dir}:") && key != cache_with_time }
4247
+ @dir_cache.delete_if { |key, _| key.start_with?("#{dir}:") && key != cache_key }
4236
4248
 
4237
4249
  result
4238
4250
  rescue => e
@@ -5458,6 +5470,9 @@ def tagged_info # SHOW THE LIST OF TAGGED ITEMS IN @pR {{{2
5458
5470
  end
5459
5471
 
5460
5472
  # MAIN PROGRAM {{{1
5473
+ # Initialize rcurses (required for rcurses 6.0.0+)
5474
+ Rcurses.init!
5475
+
5461
5476
  ## Get terminal size {{{2
5462
5477
  @h, @w = IO.console.winsize
5463
5478
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtfm-filemanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.12
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-12 00:00:00.000000000 Z
11
+ date: 2025-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcurses
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.9.5
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.9.5
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bootsnap
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '7.4'
55
55
  description: |-
56
- RTFM v6.0.12: Fixed terminal state issue causing multiple keypresses required in VIM when opening text files.
56
+ RTFM v7.0.0: Breaking change - requires rcurses 6.0.0+ for Ruby 3.4+ compatibility.
57
57
  A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. Features include remote SSH/SFTP browsing, interactive SSH shell, comprehensive undo system, bookmarks, and much more. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers.
58
58
  email: g@isene.com
59
59
  executables: