rtfm-filemanager 5.5 → 5.6.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 +12 -7
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3adff711bc3fdca42354f4cb1219a49bf07c2f70d51a2543d44a06d669e8bd13
4
- data.tar.gz: a9e0336e40cf10d633bf4d6195ce4cc871c1d84c7e598c8fe401e292f4576d13
3
+ metadata.gz: 640b4b9aa3f52d8e006c1c11fff61446941383e284119f69d6766ec26581823d
4
+ data.tar.gz: 225fc4b42a2b666e1e5a99788df045b943a5ec1e448509995b4ca8b6ea3061e0
5
5
  SHA512:
6
- metadata.gz: a138b9fb525e5b79badb5cf0f2836afae927f79047cfb2096316b9078598edf9f921d3086a3c889c7bed5f4632354d571819ee364a57d8f61955649aa61e15f1
7
- data.tar.gz: c83a99917d8b869bdcfc1a8ea19f07b6713eb09ff3703cccd07aa6beff7976b2f40705be492c97daa7ff4e5abc322c2cc940dfafc4c28c1344418c2038702ba0
6
+ metadata.gz: 176d2943cc0433a204017f43c41337ca78079d69e78f2131b6a932c0b47b61eedfa78cfc14a4f8d3f85f7eece1a5e4042ed0408a631bf27c395df7d107132ec4
7
+ data.tar.gz: bdb702b5979b4737d1e05108b02cb0f80da1cfa098059dfc1456ca7738f241577b3ee1d3e69132194e04b2da6c70441b899a6614add4e4131a1e0ab4db5784f5
data/bin/rtfm CHANGED
@@ -18,7 +18,14 @@
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.5' # Catching and swallowing of some errors
21
+ @version = '5.6.1' # Fixed a small copy path bug
22
+
23
+ # SAVE & STORE TERMINAL {{{1
24
+ ORIG_STTY = `stty -g`.chomp
25
+
26
+ at_exit do
27
+ system("stty #{ORIG_STTY} < /dev/tty") rescue nil
28
+ end
22
29
 
23
30
  # BOOTSNAP {{{1
24
31
  cache_dir = ENV.fetch('BOOTSNAP_CACHE_DIR', File.join(Dir.home, '.rtfm', 'bootsnap-cache'))
@@ -105,9 +112,6 @@ KEYS_FILE = File.join(RTFM_HOME, 'keys.rb') unless defined?(KEYS_FILE)
105
112
  CONFIG_FILE = File.join(RTFM_HOME, 'conf')
106
113
  @plugin_errors = []
107
114
 
108
- # SAVE TERMINAL {{{1
109
- ORIG_STTY = `stty -g`.chomp
110
-
111
115
  # HELP {{{1
112
116
  @help = <<~HELPTEXT
113
117
  RTFM - Ruby Terminal File Manager (https://github.com/isene/RTFM)
@@ -1325,7 +1329,7 @@ end
1325
1329
  # CLIPBOARD COPY {{{2
1326
1330
  def copy_path # {{{3
1327
1331
  if @selected
1328
- clip = "xclip -selection #{_chr == 'Y' ? 'clipboard' : 'primary'} -in -loops 1"
1332
+ clip = "xclip -selection #{getchr == 'Y' ? 'clipboard' : 'primary'} -in -loops 1"
1329
1333
  @pB.say(' Path copied')
1330
1334
  shell("echo -n '#{@selected}' | #{clip}")
1331
1335
  else
@@ -2071,9 +2075,10 @@ def open_selected(html = nil) # OPEN SELECTED ITEM (when pressing RIGHT or via o
2071
2075
  return
2072
2076
  end
2073
2077
  if File.read(@selected).force_encoding('UTF-8').valid_encoding? # Pure text
2078
+ system("stty #{ORIG_STTY} < /dev/tty")
2079
+ # Clear to top-left
2080
+ system('clear < /dev/tty > /dev/tty')
2074
2081
  Cursor.show
2075
- $stdin.raw!
2076
- $stdin.echo = false
2077
2082
  editor = ENV.fetch('EDITOR', 'vi') # Launch $EDITOR on the real TTY
2078
2083
  system("#{editor} #{Shellwords.escape(@selected)}")
2079
2084
  $stdin.raw!
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.5'
4
+ version: 5.6.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-05-19 00:00:00.000000000 Z
11
+ date: 2025-05-22 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.5: Catching and swallowing of some errors.
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.6.1: Fixed a small copy path bug.
58
58
  email: g@isene.com
59
59
  executables:
60
60
  - rtfm