rtfm-filemanager 7.0.2 → 7.0.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 +50 -25
- 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: a278df456b12ebc5d5b36a4652cc8dce21040d7417dd588e6f79f679c8b6eae2
|
4
|
+
data.tar.gz: e0c0ac5fceb6eaf57a23e47a8103e3d89174e48c9c77de4f31d55110e234aeaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e9722cc4aa1d1184268aa894fc8b7bcf0429d77765e44fcff0a72b4ecd490939a18c445a94e291d2718370d8fd4594128b05922fa893d6db33f8c3a0bffda2
|
7
|
+
data.tar.gz: c9b6daabc9ec9f8f212eb161300d502c89303bcc68213edab3686925f182cd09c743d9aa7a43e8896052425cbbbf013a769eece4d1235fec55e353a48c4da815
|
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.
|
21
|
+
@version = '7.0.4' # Fixed platform-specific issues for macOS/BSD and improved first-run message
|
22
22
|
|
23
23
|
# SAVE & STORE TERMINAL {{{1
|
24
24
|
ORIG_STTY = `stty -g`.chomp
|
@@ -439,26 +439,35 @@ def display_welcome_message # {{{2
|
|
439
439
|
Next time you run RTFM, you can launch it from your terminal with a one letter command: 'r'
|
440
440
|
When launched this way, RTFM will also exit in the directory you are currently in.\n".b.fg(226)
|
441
441
|
@firstrun += "
|
442
|
-
To benefit fully from all the features, you need to install some auxiliary software.
|
443
|
-
On Ubuntu Linux you would use 'apt install':\n".fg(230)
|
442
|
+
To benefit fully from all the features, you need to install some auxiliary software.\n".fg(230)
|
444
443
|
@firstrun += "
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
Viewing MS
|
455
|
-
|
456
|
-
|
457
|
-
|
444
|
+
Required dependencies:
|
445
|
+
• x11-utils (X11 utilities for clipboard support)
|
446
|
+
• xdotool (for window management features)
|
447
|
+
|
448
|
+
Recommended viewers (install as needed):
|
449
|
+
• bat - Syntax highlighting of text files
|
450
|
+
• pandoc - Viewing Markdown documents
|
451
|
+
• pdftotext (from poppler-utils) - Viewing PDFs
|
452
|
+
• odt2txt - Viewing LibreOffice documents
|
453
|
+
• docx2txt - Viewing MS Word docx files
|
454
|
+
• unzip - Viewing MS PowerPoint pptx files
|
455
|
+
• ssconvert (from gnumeric) - Viewing MS Excel xlsx files
|
456
|
+
• catdoc, xls2csv, catppt - Viewing older MS Office formats
|
457
|
+
• w3m, ImageMagick - Viewing images
|
458
|
+
• ffmpegthumbnailer - Video thumbnails\n".fg(195)
|
458
459
|
@firstrun += "
|
459
|
-
|
460
|
+
Installation methods vary by platform:\n".fg(159)
|
460
461
|
@firstrun += "
|
461
|
-
|
462
|
+
• Linux (Debian/Ubuntu): Use apt
|
463
|
+
• Linux (Fedora/RHEL): Use dnf/yum
|
464
|
+
• macOS: Use Homebrew (brew)
|
465
|
+
• BSD: Use pkg or ports
|
466
|
+
|
467
|
+
For Ubuntu/Debian users, install all dependencies with:
|
468
|
+
sudo apt install ruby-full git libncurses-dev x11-utils xdotool bat pandoc poppler-utils odt2txt docx2txt unzip gnumeric catdoc w3m imagemagick ffmpegthumbnailer
|
469
|
+
|
470
|
+
Note: Package names may vary between platforms. The 'libncurses-dev' package is Linux-specific.".b.fg(87)
|
462
471
|
@firstrun += "\n\n
|
463
472
|
You need to install the basic requirements and you should install the viewers before you...
|
464
473
|
... hit any key to start RTFM. Hit ? inside RTFM to show the full help text. Enjoy :-)\n".fg(214)
|
@@ -531,7 +540,10 @@ $stdin.set_encoding(Encoding::UTF_8)
|
|
531
540
|
@rubycolor = 52 # Default color for Ruby pane at bottom
|
532
541
|
@aicolor = 58 # Default color for AI pane at bottom
|
533
542
|
@sshcolor = 54 # Default color for SSH pane at bottom (purple-ish)
|
534
|
-
|
543
|
+
|
544
|
+
# Platform detection for ls command options
|
545
|
+
@is_macos_bsd = RUBY_PLATFORM =~ /darwin|bsd/i
|
546
|
+
@lsbase = @is_macos_bsd ? '' : '--group-directories-first' # Basic ls setup (GNU-specific option)
|
535
547
|
@lsuser = '' # Set this variable in ~/.rtfm/conf to any 'ls' switch you want to customize directory listings
|
536
548
|
@batuse = true # Use batcat for syntax highlighting
|
537
549
|
@runmailcap = false # Set to 'true' in ~/.rtfm/conf if you want to use run-mailcap instead of xdg-open
|
@@ -1458,7 +1470,7 @@ def toggle_all # {{{3
|
|
1458
1470
|
end
|
1459
1471
|
|
1460
1472
|
def toggle_long # {{{3
|
1461
|
-
@lslong = @lslong.empty? ? '-lh --time-style=long-iso' : ''
|
1473
|
+
@lslong = @lslong.empty? ? (@is_macos_bsd ? '-lhT' : '-lh --time-style=long-iso') : ''
|
1462
1474
|
@pR.update = @pB.update = true
|
1463
1475
|
end
|
1464
1476
|
|
@@ -3228,6 +3240,9 @@ def delete_items # {{{3
|
|
3228
3240
|
end
|
3229
3241
|
@tagged.clear
|
3230
3242
|
|
3243
|
+
# Store the old preview text to detect if it needs updating
|
3244
|
+
old_preview_text = @pR.text
|
3245
|
+
|
3231
3246
|
# Refresh the file list to reflect deletions
|
3232
3247
|
@pL.update = true
|
3233
3248
|
render # This will update @files and @selected
|
@@ -3238,9 +3253,11 @@ def delete_items # {{{3
|
|
3238
3253
|
@pR.text = ""
|
3239
3254
|
@pR.refresh
|
3240
3255
|
else
|
3241
|
-
# Files exist - update preview for new selection
|
3256
|
+
# Files exist - force update preview for new selection
|
3257
|
+
# Clear the preview text to ensure it gets regenerated
|
3258
|
+
@pR.text = ""
|
3242
3259
|
@pR.update = true
|
3243
|
-
render # Update the preview pane
|
3260
|
+
render # Update the preview pane with the new selection
|
3244
3261
|
end
|
3245
3262
|
|
3246
3263
|
@pB.say("#{action} #{paths.size} items#{@trash ? " to #{TRASH_DIR}" : ''}".fg(204))
|
@@ -4237,7 +4254,8 @@ def get_cached_dirlist(dir, ls_options) # {{{2
|
|
4237
4254
|
# Generate new directory listing
|
4238
4255
|
begin
|
4239
4256
|
purels = command("ls #{Shellwords.escape(dir)} #{ls_options}").pure.split("\n")
|
4240
|
-
|
4257
|
+
color_opt = @is_macos_bsd ? '-G' : '--color'
|
4258
|
+
colorls = command("ls #{color_opt} #{Shellwords.escape(dir)} #{ls_options} #{@lslong}").split("\n")
|
4241
4259
|
|
4242
4260
|
result = { purels: purels, colorls: colorls }
|
4243
4261
|
@dir_cache[cache_key] = result
|
@@ -4407,7 +4425,8 @@ def dirlist(left: true, directory: nil) # LIST DIRECTORIES {{{2
|
|
4407
4425
|
else
|
4408
4426
|
# No cache available, generate fresh directory listing
|
4409
4427
|
begin
|
4410
|
-
|
4428
|
+
color_opt = @is_macos_bsd ? '-G' : '--color=always'
|
4429
|
+
color_output = command("ls #{Shellwords.escape(dir)} #{color_opt} #{ls_options}")
|
4411
4430
|
pure_output = command("ls #{Shellwords.escape(dir)} #{ls_options}")
|
4412
4431
|
purels = pure_output.pure.split("\n")
|
4413
4432
|
colorls = color_output.split("\n")
|
@@ -4445,7 +4464,8 @@ def dirlist(left: true, directory: nil) # LIST DIRECTORIES {{{2
|
|
4445
4464
|
@selected = Dir.pwd + '/' + purels[@index]
|
4446
4465
|
sfile = @selected.dup
|
4447
4466
|
sfile += '/' if File.directory?(@selected)
|
4448
|
-
|
4467
|
+
time_opt = @is_macos_bsd ? '-T' : '--time-style=long-iso'
|
4468
|
+
slsl_cmd = "ls -ldHlh #{time_opt} #{Shellwords.escape(sfile)}"
|
4449
4469
|
slsl = command(slsl_cmd)
|
4450
4470
|
a = slsl.split
|
4451
4471
|
@fileattr = a.size >= 7 ? "#{a[2]}:#{a[3]} #{a[0]} #{a[4]} #{a[5]} #{a[6]}" : ''
|
@@ -5066,6 +5086,11 @@ def open_selected(html = nil) # OPEN SELECTED FILE {{{2
|
|
5066
5086
|
# Restore terminal state
|
5067
5087
|
system("stty $(cat /tmp/rtfm_stty_$$) < /dev/tty")
|
5068
5088
|
system("rm -f /tmp/rtfm_stty_$$")
|
5089
|
+
# Flush any pending input and reset stdin
|
5090
|
+
$stdin.iflush if $stdin.respond_to?(:iflush)
|
5091
|
+
system('stty raw -echo isig < /dev/tty')
|
5092
|
+
$stdin.raw!
|
5093
|
+
$stdin.echo = false
|
5069
5094
|
# Reinitialize rcurses
|
5070
5095
|
Rcurses.init!
|
5071
5096
|
Cursor.hide
|
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.
|
4
|
+
version: 7.0.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-08-
|
11
|
+
date: 2025-08-19 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.
|
56
|
+
RTFM v7.0.4: Fixed platform compatibility for macOS/BSD and improved first-run message.
|
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:
|