rtfm-filemanager 5 → 5.1

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 +15 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6057bc9ae7f88f3b05029fe3de2529d72279620808f04e040de4ae38844d31e4
4
- data.tar.gz: ade554a33f58d9ac4543a9582f8f5aa707a2a18ebd76822c19b6ec4e15d175a2
3
+ metadata.gz: 6bbc6d64124646007a63f55a1893559ed4280b222bc7b22125e3989faada4e3e
4
+ data.tar.gz: 7f1df3080c4503c2245cb662a787b23fa2431ee71e4fe3c93fd4e46c0a6c57d6
5
5
  SHA512:
6
- metadata.gz: da784ee1fedec71ef87abcec3760a5cec1ec803938123556982c860894ace9ed7076fefefe153ca60c37c06c7291c89a5c1111f06fde429bbedf1d5f5c14b1f0
7
- data.tar.gz: f599aa1dd8d1b70977655bd9a2c655f19517c3ef9897eda78e2aa8197674a4343f4bbd22b6829641e18fe09f019b00787a2fd85d1103541a31b45612d91c1ee5
6
+ metadata.gz: 26798f5fef31aa07c29e9a0ce9433e5515f9dce99a192b0fb5a2ee01e43c82f744d68f696245855701ae7e0f41e341064c40f30e82877eb96de8fc82028f7a10
7
+ data.tar.gz: 6fbc30447092da044758ebf632155f9a94a97271558ebdd9d667fee7a8a5c1fa5f07578afe4e0240a2f43193e7361bc1a4fee06abaf810b4ba71729410b322d0
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.0' # A full rewrite using https://github.com/isene/rcurses
21
+ @version = '5.1' # Fixed a rare bug on opening $EDITOR
22
22
 
23
23
  # BOOTSNAP {{{1
24
24
  cache_dir = ENV.fetch('BOOTSNAP_CACHE_DIR', File.join(Dir.home, '.rtfm', 'bootsnap-cache'))
@@ -2073,8 +2073,20 @@ def open_selected(html = nil) # OPEN SELECTED ITEM (when pressing RIGHT or via o
2073
2073
  return
2074
2074
  end
2075
2075
  if File.read(@selected).force_encoding('UTF-8').valid_encoding? # Pure text
2076
- system("exec $EDITOR #{Shellwords.escape(@selected)}")
2077
- Rcurses.clear_screen
2076
+ system("stty #{ORIG_STTY} < /dev/tty") # Restore terminal so $EDITOR can take over
2077
+ system('clear < /dev/tty > /dev/tty') # Clear RTFM off the screen
2078
+ Cursor.show
2079
+ editor = ENV.fetch('EDITOR', 'vi') # Launch $EDITOR on the real TTY
2080
+ pid = Process.spawn(editor, Shellwords.escape(@selected),
2081
+ in: '/dev/tty',
2082
+ out: '/dev/tty',
2083
+ err: '/dev/tty')
2084
+ Process.wait(pid)
2085
+ system('stty raw -echo isig < /dev/tty') # Re-enter raw/no-echo mode and hide cursor
2086
+ $stdin.raw!
2087
+ $stdin.echo = false
2088
+ Cursor.hide
2089
+ Rcurses.clear_screen # Redraw RTFM
2078
2090
  refresh
2079
2091
  render
2080
2092
  return
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.1'
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-04-28 00:00:00.000000000 Z
11
+ date: 2025-04-30 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.
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.1: Fixed a rare bug on opening $EDITOR.
58
58
  email: g@isene.com
59
59
  executables:
60
60
  - rtfm