rtfm-filemanager 5.4 → 5.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 +21 -6
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b36bdc259840435d9b71deaea0bee4abdb1facdd3b0371549fc49d90c01fc92
4
- data.tar.gz: d0c48761155ca6e31bf2a0ec78004925e1f2ae1e41bb944f885a4cf923c339a2
3
+ metadata.gz: 3adff711bc3fdca42354f4cb1219a49bf07c2f70d51a2543d44a06d669e8bd13
4
+ data.tar.gz: a9e0336e40cf10d633bf4d6195ce4cc871c1d84c7e598c8fe401e292f4576d13
5
5
  SHA512:
6
- metadata.gz: d7fedf5273a6d46f61d3f328d379f2c480d9b21375a837765803c59b29eca9631f5e5a862ca9346497c6e73b38a6c40a84b0215db28f6c574e721a1ffd237c0a
7
- data.tar.gz: 3f49418f17c471b2d8f2ab60e450cc41cca89c64b857921d47bf9891dbed980a55b76aa5b0d8044061c1bab60144d1dde0c0f1f532e813c56b485b767eed7c41
6
+ metadata.gz: a138b9fb525e5b79badb5cf0f2836afae927f79047cfb2096316b9078598edf9f921d3086a3c889c7bed5f4632354d571819ee364a57d8f61955649aa61e15f1
7
+ data.tar.gz: c83a99917d8b869bdcfc1a8ea19f07b6713eb09ff3703cccd07aa6beff7976b2f40705be492c97daa7ff4e5abc322c2cc940dfafc4c28c1344418c2038702ba0
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 = '5.4' # Removed tty startup/exit codes as rcurses now handles that
21
+ @version = '5.5' # Catching and swallowing of some errors
22
22
 
23
23
  # BOOTSNAP {{{1
24
24
  cache_dir = ENV.fetch('BOOTSNAP_CACHE_DIR', File.join(Dir.home, '.rtfm', 'bootsnap-cache'))
@@ -679,6 +679,9 @@ def getkey # {{{3
679
679
  m = method(handler)
680
680
  m.arity == 1 ? m.call(chr) : m.call
681
681
  end
682
+ rescue Errno::EIO
683
+ # ignore transient TTY/read errors when upon focus switch
684
+ return
682
685
  rescue StandardError => e
683
686
  errormsg('⚷ Error in getkey', e)
684
687
  end
@@ -2005,7 +2008,7 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
2005
2008
  img_max_h += 2
2006
2009
  `echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
2007
2010
  else
2008
- img_w, img_h = `identify -format "%[fx:w]x%[fx:h]" #{image} 2>/dev/null`.split('x')
2011
+ img_w, img_h = `identify -format "%[fx:w]x%[fx:h]" #{Shellwords.escape(image)} 2>/dev/null`.split('x')
2009
2012
  img_w = img_w.to_i
2010
2013
  img_h = img_h.to_i
2011
2014
  if img_w > img_max_w
@@ -2153,14 +2156,26 @@ $stdin.getc while $stdin.wait_readable(0)
2153
2156
  #checkpoint("Program started")
2154
2157
  loop do
2155
2158
  @dir_old = Dir.pwd
2156
- render
2157
- getkey
2158
- begin # If cwd was deleted externally, jump home
2159
+ # redraw, but ignore TTY‐focus errors
2160
+ begin
2161
+ render
2162
+ rescue Errno::EIO
2163
+ # nothing
2164
+ end
2165
+ # read key, but ignore TTY-focus errors
2166
+ begin
2167
+ getkey
2168
+ rescue Errno::EIO
2169
+ # nothing
2170
+ end
2171
+ # If cwd was deleted externally, jump home
2172
+ begin
2159
2173
  Dir.pwd
2160
2174
  rescue
2161
2175
  Dir.chdir
2162
2176
  end
2163
- @index = @directory[Dir.pwd] || 0 if Dir.pwd != @dir_old # If we cd'd, restore index
2177
+ # restore index if we cd'd
2178
+ @index = @directory[Dir.pwd] || 0 if Dir.pwd != @dir_old
2164
2179
  unless @navi.empty?
2165
2180
  command(@navi)
2166
2181
  @navi = ''
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: '5.4'
4
+ version: '5.5'
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-05-14 00:00:00.000000000 Z
11
+ date: 2025-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcurses
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '7.4'
55
55
  description: |-
56
56
  Major release - RTFM v5: Complete rewrite using rcurses (https://github.com/isene/rcurses). Massive improvements. AI integration.
57
- A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. 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. 5.4: Removed tty startup/exit codes as rcurses now handles that.
57
+ A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. 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. 5.5: Catching and swallowing of some errors.
58
58
  email: g@isene.com
59
59
  executables:
60
60
  - rtfm