rtfm-filemanager 7.0.8 → 7.0.10

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 +16 -9
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe74615d16c35a3df2cd43dc915eac92084b47c5c459a8d55699bfdea8d8901c
4
- data.tar.gz: 792b91626ef04bd1afa86056b5937502e344864c3cd33a1713fce86206123118
3
+ metadata.gz: 8fd762390ad851e1dc15dad9d9a9f1657939f84a47ddb7901a0876d8aff3c12e
4
+ data.tar.gz: 171cfe2b01183acad06a46484391e8b9017c0b748b28a573e3b67a540bcbc89a
5
5
  SHA512:
6
- metadata.gz: 904e4487383b214f68096d13d4a207e3e04bcf6f48262dda18fd364a9846a1549a6c834dc206d939dcbffdbcbc1a9bdb52c40027a705e9d8a1a5485653235cfc
7
- data.tar.gz: 5d7599105945ca79638a10b06d9847c1ce0d7b1b977bc2ac26f1bfd4b5c708acb9fac17b82155b4a122a7b559c47809e9d604f51623c74a54f3b480306198990
6
+ metadata.gz: 7d9c90bcf338ad88eec1ff04d170238e7f3accc3131bb47a6b71b3a4bc1e65b103e8230825d9853ac3db86501e18cdc30f038b215e766d191cd2b89782eccc20
7
+ data.tar.gz: 8fdc1100e82190f7b500468d06227b2171d024fba8998daf38b774b5b9cdab5da5063383990d0048cd9e1ac37cfb4aea604c9096438bff3f8152794df27f6b06
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 = '7.0.8' # Fixed ALL SVG metadata processing to prevent hangs
21
+ @version = '7.0.10' # Fixed terminal state issue for interactive programs like HyperList
22
22
 
23
23
  # SAVE & STORE TERMINAL {{{1
24
24
  ORIG_STTY = `stty -g`.chomp
@@ -57,7 +57,7 @@ def check_image_redraw # {{{2
57
57
  img_processes = `pgrep w3mimgdisplay 2>/dev/null`.chomp
58
58
  if img_processes.empty? && File.exist?(@current_image_path)
59
59
  # Redraw the image
60
- showimage(Shellwords.escape(@current_image_path))
60
+ showimage(@current_image_path)
61
61
  end
62
62
  rescue
63
63
  # Silently fail - we don't want focus checking to break anything
@@ -5049,6 +5049,8 @@ def open_selected(html = nil) # OPEN SELECTED FILE {{{2
5049
5049
  # Use exactly the same logic as command_mode with § prefix (force interactive)
5050
5050
  # Restore shell tty so Ctrl-C/D work
5051
5051
  system("stty #{ORIG_STTY} < /dev/tty")
5052
+ # Reset terminal to sane/cooked mode for interactive programs
5053
+ system('stty sane < /dev/tty')
5052
5054
  # Clear to top-left
5053
5055
  system('clear < /dev/tty > /dev/tty')
5054
5056
  Cursor.show
@@ -5303,7 +5305,7 @@ def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
5303
5305
  if file_size > 50_000_000 # 50MB limit for images
5304
5306
  @pR.say("Image too large for preview (#{(file_size / 1024.0 / 1024.0).round(1)}MB > 50MB limit)")
5305
5307
  else
5306
- showimage(Shellwords.escape(@selected))
5308
+ showimage(@selected)
5307
5309
  @image = true
5308
5310
  end
5309
5311
  rescue => e
@@ -5431,8 +5433,12 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5431
5433
  `echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
5432
5434
  @current_image_path = nil # Clear tracking when image is cleared
5433
5435
  else
5434
- # Use the already-escaped image for shell commands
5435
- dimensions = `identify -format "%wx%h" #{image} 2>/dev/null`
5436
+ # Ensure we have the absolute path
5437
+ img_path = File.absolute_path(image)
5438
+
5439
+ # Properly escape image path for shell commands
5440
+ escaped_image = Shellwords.escape(img_path)
5441
+ dimensions = `identify -format "%wx%h" #{escaped_image} 2>/dev/null`
5436
5442
  img_w, img_h = dimensions.split('x').map(&:to_i)
5437
5443
 
5438
5444
  # Fix: Use simultaneous scaling to prevent overflow
@@ -5445,10 +5451,11 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5445
5451
  img_h = (img_h * scale).to_i
5446
5452
  end
5447
5453
 
5448
- # Fix: Unescape the filename for w3mimgdisplay protocol, then quote it
5449
- unescaped = image.gsub(/\\(.)/, '\1') # Remove shell escaping
5450
- `echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{unescaped}\"\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
5451
- @current_image_path = unescaped # Track currently displayed image
5454
+ # Use the absolute path without extra quotes in the w3mimgdisplay protocol
5455
+ `echo '0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;#{img_path}
5456
+ 4;
5457
+ 3;' | #{@imgdisplay} 2>/dev/null`
5458
+ @current_image_path = img_path # Track currently displayed image
5452
5459
  end
5453
5460
  rescue
5454
5461
  @pR.text = 'Error showing image'
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: 7.0.8
4
+ version: 7.0.10
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-21 00:00:00.000000000 Z
11
+ date: 2025-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcurses
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '7.4'
55
55
  description: |-
56
- RTFM v7.0.8: Fixed SVG processing hangs, improved undo system with unique trash filenames, and better preview handling.
56
+ RTFM v7.0.10: Fixed terminal state issue causing multiple keypresses required in interactive programs like HyperList.
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: