rtfm-filemanager 7.0.4 → 7.0.5

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 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a278df456b12ebc5d5b36a4652cc8dce21040d7417dd588e6f79f679c8b6eae2
4
- data.tar.gz: e0c0ac5fceb6eaf57a23e47a8103e3d89174e48c9c77de4f31d55110e234aeaa
3
+ metadata.gz: a868de1ca6a2f8cb3706cd0d297fa452c20e08b96fcac59146c560779b991f7d
4
+ data.tar.gz: 670836887ce9581a5d2083e7cd12c38e8c52817bd0bf5eb40ebfe62e4b66df96
5
5
  SHA512:
6
- metadata.gz: a3e9722cc4aa1d1184268aa894fc8b7bcf0429d77765e44fcff0a72b4ecd490939a18c445a94e291d2718370d8fd4594128b05922fa893d6db33f8c3a0bffda2
7
- data.tar.gz: c9b6daabc9ec9f8f212eb161300d502c89303bcc68213edab3686925f182cd09c743d9aa7a43e8896052425cbbbf013a769eece4d1235fec55e353a48c4da815
6
+ metadata.gz: 12ea6e3767d8816c3e80e85888521fd8a772014d3480b4f59e9bfa68c7c0fd7a83aa3bd1f0a901e35595895e8eda5f4d48397de629d5a5ef57d4e9149c7ecd88
7
+ data.tar.gz: b3376a6308e4a5e415ceb688074017ba8ce44d9dfd66fa0da9150b75b24b8b11a0a65488566b175695e8e77822d6080ddc86bf125fddf3c602ed8f5f8f0229a7
data/bin/rtfm CHANGED
@@ -5178,6 +5178,22 @@ end
5178
5178
  # RIGHT PANE FUNCTIONS {{{1
5179
5179
  def showcommand(cmd) # Helper function for showcontent {{{2
5180
5180
  c = command(cmd)
5181
+
5182
+ # If command failed or returned empty, try fallback to cat
5183
+ if c == '' || c.nil?
5184
+ # Extract the original filename from the command
5185
+ # Handle various command patterns
5186
+ if cmd =~ /pandoc\s+'([^']+)'/ || cmd =~ /pandoc\s+(\S+)/
5187
+ # Markdown file - fallback to cat
5188
+ filename = $1
5189
+ c = command("cat #{Shellwords.escape(filename)}")
5190
+ elsif cmd =~ /#{@bat}\s+[^']*'([^']+)'/ || cmd =~ /#{@bat}\s+[^']*(\S+)/
5191
+ # Shell scripts and text files - fallback to cat
5192
+ filename = $1
5193
+ c = command("cat #{Shellwords.escape(filename)}")
5194
+ end
5195
+ end
5196
+
5181
5197
  return if c == ''
5182
5198
 
5183
5199
  @pR.say(c)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtfm-filemanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 7.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '7.4'
55
55
  description: |-
56
- RTFM v7.0.4: Fixed platform compatibility for macOS/BSD and improved first-run message.
56
+ RTFM v7.0.5: Added fallback to 'cat' when pandoc or batcat are not available (Issue #8).
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: