rtfm-filemanager 5.3 → 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.
- checksums.yaml +4 -4
- data/bin/rtfm +21 -21
- 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: 3adff711bc3fdca42354f4cb1219a49bf07c2f70d51a2543d44a06d669e8bd13
|
4
|
+
data.tar.gz: a9e0336e40cf10d633bf4d6195ce4cc871c1d84c7e598c8fe401e292f4576d13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
@@ -1906,11 +1909,6 @@ def exit_rtfm # CLEAN EXIT {{{2
|
|
1906
1909
|
rescue StandardError # rubocop:disable Lint/SuppressedException
|
1907
1910
|
end
|
1908
1911
|
end
|
1909
|
-
# Restore terminal state
|
1910
|
-
$stdin.cooked!
|
1911
|
-
$stdin.echo = true
|
1912
|
-
Rcurses.clear_screen
|
1913
|
-
Cursor.show
|
1914
1912
|
# Also record for the 'r' launcher
|
1915
1913
|
last = File.join(Dir.home, '.rtfm_last_dir')
|
1916
1914
|
begin
|
@@ -2010,7 +2008,7 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
|
|
2010
2008
|
img_max_h += 2
|
2011
2009
|
`echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
2012
2010
|
else
|
2013
|
-
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')
|
2014
2012
|
img_w = img_w.to_i
|
2015
2013
|
img_h = img_h.to_i
|
2016
2014
|
if img_w > img_max_w
|
@@ -2150,9 +2148,6 @@ Signal.trap('WINCH') do
|
|
2150
2148
|
render
|
2151
2149
|
end
|
2152
2150
|
|
2153
|
-
## Set terminal to raw w/o echo {{{2
|
2154
|
-
$stdin.raw!
|
2155
|
-
$stdin.echo = false
|
2156
2151
|
|
2157
2152
|
## One-time flush {{{2
|
2158
2153
|
$stdin.getc while $stdin.wait_readable(0)
|
@@ -2161,14 +2156,26 @@ $stdin.getc while $stdin.wait_readable(0)
|
|
2161
2156
|
#checkpoint("Program started")
|
2162
2157
|
loop do
|
2163
2158
|
@dir_old = Dir.pwd
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
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
|
2167
2173
|
Dir.pwd
|
2168
2174
|
rescue
|
2169
2175
|
Dir.chdir
|
2170
2176
|
end
|
2171
|
-
|
2177
|
+
# restore index if we cd'd
|
2178
|
+
@index = @directory[Dir.pwd] || 0 if Dir.pwd != @dir_old
|
2172
2179
|
unless @navi.empty?
|
2173
2180
|
command(@navi)
|
2174
2181
|
@navi = ''
|
@@ -2178,11 +2185,4 @@ rescue StandardError => e
|
|
2178
2185
|
errormsg('⚠ Internal Error', e)
|
2179
2186
|
end
|
2180
2187
|
|
2181
|
-
at_exit do # Always restore terminal state on quit (or fatal)
|
2182
|
-
$stdin.cooked!
|
2183
|
-
$stdin.echo = true
|
2184
|
-
Rcurses.clear_screen
|
2185
|
-
Cursor.show
|
2186
|
-
end
|
2187
|
-
|
2188
2188
|
# vim: set sw=2 sts=2 et fdm=marker fdn=2 fcs=fold\:\ :
|
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
|
+
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-
|
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.
|
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
|