rtfm-filemanager 7.3.2 → 7.3.4
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 +55 -13
- 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: b7fda1f5461bae4662b7ede88c67251c73e959dc480a3568d53e1f11cc061ee7
|
|
4
|
+
data.tar.gz: 51d4cf06be62c4c8dcc301acf1374b9f9c258df78291818213d3f9539f8b036d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b5fdf8dd7cc1bdba3b43eae0f9c1dc1beeaa14541c8647f90370a3440b8e3b73fa56a08b8030c9af22e694df7dde4dea9cee5a382736ef92004b475d52a02bf
|
|
7
|
+
data.tar.gz: 6bb8bdb7c7fa5157e080ac3e718255570a7ac42bb8525576484d654d3b52dfd47016a24c5bf57f1dab90f897c48de043ed56c4cf59156d9c6f433e785c186ae7
|
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.3.
|
|
21
|
+
@version = '7.3.4' # Critical bugfix for permanent delete
|
|
22
22
|
|
|
23
23
|
# SAVE & STORE TERMINAL {{{1
|
|
24
24
|
ORIG_STTY = `stty -g`.chomp
|
|
@@ -1043,10 +1043,12 @@ end
|
|
|
1043
1043
|
# MAIN GETKEY FOR USER INPUT {{{2
|
|
1044
1044
|
def getkey # {{{3
|
|
1045
1045
|
chr = getchr(1)
|
|
1046
|
-
|
|
1047
|
-
#
|
|
1048
|
-
|
|
1049
|
-
|
|
1046
|
+
|
|
1047
|
+
# Only check image redraw when idle (no keypress) to avoid delays during active use
|
|
1048
|
+
if chr.nil? && @showimage
|
|
1049
|
+
check_image_redraw
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1050
1052
|
return unless chr
|
|
1051
1053
|
|
|
1052
1054
|
# Don't clear image here - let render system handle it when @pR.update is true
|
|
@@ -1065,6 +1067,7 @@ end
|
|
|
1065
1067
|
|
|
1066
1068
|
# BASIC KEYS {{{2
|
|
1067
1069
|
def show_help # {{{3
|
|
1070
|
+
clear_image
|
|
1068
1071
|
help_info
|
|
1069
1072
|
end
|
|
1070
1073
|
|
|
@@ -1146,6 +1149,7 @@ def refresh_all # {{{3
|
|
|
1146
1149
|
end
|
|
1147
1150
|
|
|
1148
1151
|
def show_config
|
|
1152
|
+
clear_image
|
|
1149
1153
|
@pR.say('Configuration'.u.fg(254) + ":\n\n" + @conf.fg(249))
|
|
1150
1154
|
end
|
|
1151
1155
|
|
|
@@ -2242,6 +2246,7 @@ end
|
|
|
2242
2246
|
|
|
2243
2247
|
# FILE COMPARISON {{{2
|
|
2244
2248
|
def compare_files # {{{3
|
|
2249
|
+
clear_image
|
|
2245
2250
|
if @tagged.length == 0
|
|
2246
2251
|
@pB.say("No files tagged for comparison. Tag 2 files with 't'".fg(196))
|
|
2247
2252
|
return
|
|
@@ -3265,12 +3270,15 @@ def delete_items # {{{3
|
|
|
3265
3270
|
|
|
3266
3271
|
tagged_info
|
|
3267
3272
|
|
|
3273
|
+
# Clear image before showing warning text
|
|
3274
|
+
clear_image
|
|
3275
|
+
|
|
3268
3276
|
# Add deletion warning to the right pane
|
|
3269
3277
|
warning_text = "\n" + "=" * 50 + "\n"
|
|
3270
3278
|
action = @trash ? 'Move to Trash' : 'PERMANENT DELETE'
|
|
3271
3279
|
action_color = @trash ? 220 : 196
|
|
3272
3280
|
warning_text << action.fg(action_color).b + "\n\n"
|
|
3273
|
-
|
|
3281
|
+
|
|
3274
3282
|
if @trash
|
|
3275
3283
|
warning_text << "Items will be moved to:\n".fg(249)
|
|
3276
3284
|
warning_text << " ~/.rtfm/trash/\n".fg(240)
|
|
@@ -3280,9 +3288,9 @@ def delete_items # {{{3
|
|
|
3280
3288
|
warning_text << "Files will be permanently removed\n".fg(196)
|
|
3281
3289
|
warning_text << "This action CANNOT be undone!\n".fg(196).b
|
|
3282
3290
|
end
|
|
3283
|
-
|
|
3291
|
+
|
|
3284
3292
|
warning_text << "\n" + "Press " + "y".fg(156).b + " to confirm, any other key to cancel".fg(249)
|
|
3285
|
-
|
|
3293
|
+
|
|
3286
3294
|
@pR.text << warning_text
|
|
3287
3295
|
@pR.refresh
|
|
3288
3296
|
|
|
@@ -3324,6 +3332,8 @@ def delete_items # {{{3
|
|
|
3324
3332
|
# Only add to undo history if operation succeeded and we can undo it
|
|
3325
3333
|
add_undo_operation(undo_info)
|
|
3326
3334
|
else
|
|
3335
|
+
# Permanent deletion
|
|
3336
|
+
esc = paths.map { |p| Shellwords.escape(p) }.join(' ')
|
|
3327
3337
|
command("rm -rf #{esc}")
|
|
3328
3338
|
# Cannot undo permanent deletion, so don't add to undo history
|
|
3329
3339
|
end
|
|
@@ -3643,8 +3653,9 @@ end
|
|
|
3643
3653
|
|
|
3644
3654
|
# GIT/HASH/OPENAI {{{2
|
|
3645
3655
|
def git_status # {{{3
|
|
3656
|
+
clear_image
|
|
3646
3657
|
@pR.clear
|
|
3647
|
-
|
|
3658
|
+
|
|
3648
3659
|
# Check if we're in a git repository
|
|
3649
3660
|
unless Dir.exist?('.git') || system('git rev-parse --git-dir > /dev/null 2>&1')
|
|
3650
3661
|
@pR.say("Not a Git Repository".b.fg(196) + "\n\n" + "This directory is not under Git version control.".fg(240))
|
|
@@ -3975,6 +3986,7 @@ end
|
|
|
3975
3986
|
|
|
3976
3987
|
# SYSTEM SHORTCUTS {{{2
|
|
3977
3988
|
def system_info # {{{3
|
|
3989
|
+
clear_image
|
|
3978
3990
|
text = "SYSTEM INFORMATION".b.fg(156) + " - " + Time.now.strftime("%Y-%m-%d %H:%M:%S").fg(249) + "\n"
|
|
3979
3991
|
text << "=" * 50 + "\n\n"
|
|
3980
3992
|
|
|
@@ -4812,7 +4824,9 @@ def render # RENDER ALL PANES {{{2
|
|
|
4812
4824
|
|
|
4813
4825
|
# RIGHT pane (or Preview pane in dual-pane mode) {{{3
|
|
4814
4826
|
if @pR.update && @preview
|
|
4815
|
-
|
|
4827
|
+
# Actually clear the image overlay when rendering new content
|
|
4828
|
+
showimage('clear') if @image
|
|
4829
|
+
@image = false
|
|
4816
4830
|
righttext = @pR.text
|
|
4817
4831
|
|
|
4818
4832
|
# In dual-pane mode, construct full path from active pane
|
|
@@ -5320,8 +5334,25 @@ def open_selected(html = nil) # OPEN SELECTED FILE {{{2
|
|
|
5320
5334
|
end
|
|
5321
5335
|
return
|
|
5322
5336
|
end
|
|
5323
|
-
#
|
|
5324
|
-
|
|
5337
|
+
# Check if file is text (UTF-8, UTF-16, or other text encodings)
|
|
5338
|
+
is_text_file = false
|
|
5339
|
+
if !@selected&.match(@pdffile) && File.size(@selected) < 1_000_000
|
|
5340
|
+
sample = File.read(@selected, 1024) rescue nil
|
|
5341
|
+
if sample
|
|
5342
|
+
# Try UTF-8 first
|
|
5343
|
+
if sample.force_encoding('UTF-8').valid_encoding?
|
|
5344
|
+
is_text_file = true
|
|
5345
|
+
# Try UTF-16LE
|
|
5346
|
+
elsif sample.force_encoding('UTF-16LE').valid_encoding?
|
|
5347
|
+
is_text_file = true
|
|
5348
|
+
# Try UTF-16BE
|
|
5349
|
+
elsif sample.force_encoding('UTF-16BE').valid_encoding?
|
|
5350
|
+
is_text_file = true
|
|
5351
|
+
end
|
|
5352
|
+
end
|
|
5353
|
+
end
|
|
5354
|
+
|
|
5355
|
+
if is_text_file
|
|
5325
5356
|
# Set flag to prevent SIGWINCH from refreshing during editor
|
|
5326
5357
|
@external_program_running = true
|
|
5327
5358
|
# Save terminal state before launching editor
|
|
@@ -5655,6 +5686,16 @@ def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
|
|
|
5655
5686
|
@pR.update = false
|
|
5656
5687
|
end
|
|
5657
5688
|
|
|
5689
|
+
def clear_image(skip_actual_clear: false) # HELPER TO CLEAR CURRENT IMAGE {{{2
|
|
5690
|
+
return unless @image
|
|
5691
|
+
# For operations that immediately render text over image, skip the slow clear
|
|
5692
|
+
# The text pane will cover the image overlay anyway
|
|
5693
|
+
unless skip_actual_clear
|
|
5694
|
+
showimage('clear')
|
|
5695
|
+
end
|
|
5696
|
+
@image = false
|
|
5697
|
+
end
|
|
5698
|
+
|
|
5658
5699
|
def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
|
|
5659
5700
|
# Pass 'clear' to clear the window for previous image
|
|
5660
5701
|
return unless @showimage
|
|
@@ -5717,9 +5758,10 @@ def marks_info # SHOW MARKS IN RIGHT WINDOW {{{2
|
|
|
5717
5758
|
end
|
|
5718
5759
|
|
|
5719
5760
|
def tagged_info # SHOW THE LIST OF TAGGED ITEMS IN @pR {{{2
|
|
5761
|
+
clear_image
|
|
5720
5762
|
info = "Tagged Items".b.fg(204) + "\n"
|
|
5721
5763
|
info << "=" * 50 + "\n\n"
|
|
5722
|
-
|
|
5764
|
+
|
|
5723
5765
|
# Summary information
|
|
5724
5766
|
size_mb = (@tagsize.to_f / 1_000_000).round(2)
|
|
5725
5767
|
info << "Summary:\n".fg(226)
|
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.3.
|
|
4
|
+
version: 7.3.4
|
|
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-10-
|
|
11
|
+
date: 2025-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rcurses
|
|
@@ -67,7 +67,7 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '7.4'
|
|
69
69
|
description: |-
|
|
70
|
-
RTFM v7.3.
|
|
70
|
+
RTFM v7.3.4: Critical bugfix for permanent delete operation.
|
|
71
71
|
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.
|
|
72
72
|
email: g@isene.com
|
|
73
73
|
executables:
|