rtfm-filemanager 6.0.8 → 6.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.
- checksums.yaml +4 -4
- data/bin/rtfm +28 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae2f555bf52ad3f1fcbaa0e110b4f3b4252bf906bee100aa2a4092c6f00b858a
|
4
|
+
data.tar.gz: 20f17f27d98841596a0950eef615fd2916811459483ff3b41842f177fc6de640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55d86c42f7130b275c0bc467de36f4371269c21e33bef33b6ad4bc7d09fa6d9a21b3b75133525e8c994db7213a98e481cb5f4fc3bba292ce456472851a31120c
|
7
|
+
data.tar.gz: 4346e80ddf4a689c083becf9a6cef921fddb57659c192a3ad4e9b82c3a63deefdd74a224ae6e7abae3e5c6660f102255ab890119b571fed634fe2ca0e35954a8
|
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.
|
21
|
+
@version = '6.0.10' # Fixed filename escaping for PDF preview and GUI applications with special characters
|
22
22
|
|
23
23
|
# SAVE & STORE TERMINAL {{{1
|
24
24
|
ORIG_STTY = `stty -g`.chomp
|
@@ -4045,8 +4045,19 @@ def command_mode # {{{3
|
|
4045
4045
|
force = raw.start_with?('§')
|
4046
4046
|
raw = raw[1..].strip if force
|
4047
4047
|
# Expand @s / @t
|
4048
|
-
|
4049
|
-
|
4048
|
+
# Check if this is a GUI application that needs unescaped filenames
|
4049
|
+
gui_apps = %w[evince okular xdg-open firefox chromium nautilus thunar dolphin gwenview eog]
|
4050
|
+
first_word = raw.split.first
|
4051
|
+
|
4052
|
+
if gui_apps.include?(first_word)
|
4053
|
+
# For GUI apps, quote the filename instead of escaping
|
4054
|
+
sel = '"' + @selected.to_s.gsub('"', '\\"') + '"'
|
4055
|
+
tg = @tagged.map { |p| '"' + p.gsub('"', '\\"') + '"' }.join(' ')
|
4056
|
+
else
|
4057
|
+
# For command-line tools, use shell escaping
|
4058
|
+
sel = Shellwords.escape(@selected.to_s)
|
4059
|
+
tg = @tagged.map { |p| Shellwords.escape(p) }.join(' ')
|
4060
|
+
end
|
4050
4061
|
cmd = raw.gsub('@s', sel).gsub('@t', tg)
|
4051
4062
|
|
4052
4063
|
# Handle cd commands specially
|
@@ -4118,7 +4129,13 @@ def command_mode # {{{3
|
|
4118
4129
|
refresh
|
4119
4130
|
render
|
4120
4131
|
else
|
4121
|
-
|
4132
|
+
# Check if it's a GUI application that should run without timeout
|
4133
|
+
gui_apps = ['evince', 'xdg-open', 'firefox', 'chrome', 'chromium', 'eog', 'nautilus', 'thunar', 'gedit', 'code', 'subl']
|
4134
|
+
prog_base = File.basename(prog.to_s)
|
4135
|
+
is_gui = gui_apps.include?(prog_base)
|
4136
|
+
|
4137
|
+
# Use nil timeout (wait forever) for GUI apps, 10 seconds for others
|
4138
|
+
shellexec(cmd, timeout: is_gui ? nil : 10)
|
4122
4139
|
@pR.refresh
|
4123
4140
|
@pR.update = false
|
4124
4141
|
end
|
@@ -5147,11 +5164,16 @@ def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
|
|
5147
5164
|
entry = PREVIEW_HANDLERS.find { |re, _| re.match?(@selected) }
|
5148
5165
|
pattern, tmpl = entry || [nil, nil]
|
5149
5166
|
if tmpl # Command-based preview
|
5150
|
-
escaped = Shellwords.escape(@selected)
|
5151
5167
|
if !@batuse && tmpl.match?(/\b#{@bat}\b/)
|
5168
|
+
escaped = Shellwords.escape(@selected)
|
5152
5169
|
showcommand("cat #{escaped}")
|
5153
5170
|
else
|
5154
|
-
|
5171
|
+
# For complex commands with pipes, we need to quote the filename
|
5172
|
+
# within the shell command string since it's executed via bash -c
|
5173
|
+
# First escape any single quotes in the filename
|
5174
|
+
safe_filename = @selected.gsub("'", "'\"'\"'")
|
5175
|
+
# Then wrap in single quotes for the shell command
|
5176
|
+
cmd = tmpl.gsub('@s', "'#{safe_filename}'")
|
5155
5177
|
showcommand(cmd)
|
5156
5178
|
end
|
5157
5179
|
elsif pattern # Nil template → image or video
|
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.
|
4
|
+
version: 6.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-07-
|
11
|
+
date: 2025-07-24 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 v6.0.
|
56
|
+
RTFM v6.0.10: Fixed filename escaping for PDF preview and GUI applications with special characters (spaces, parentheses, apostrophes).
|
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:
|