rtfm-filemanager 7.0.10 → 7.0.11

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 +51 -8
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fd762390ad851e1dc15dad9d9a9f1657939f84a47ddb7901a0876d8aff3c12e
4
- data.tar.gz: 171cfe2b01183acad06a46484391e8b9017c0b748b28a573e3b67a540bcbc89a
3
+ metadata.gz: e78200976a8e712b82378dae1bff8f113943a1cca12d74646300f1f11ee2fb6f
4
+ data.tar.gz: 0a99799ebac8608030e957b77e90a5863aef00a7c09b735f9c4d48635fb7defc
5
5
  SHA512:
6
- metadata.gz: 7d9c90bcf338ad88eec1ff04d170238e7f3accc3131bb47a6b71b3a4bc1e65b103e8230825d9853ac3db86501e18cdc30f038b215e766d191cd2b89782eccc20
7
- data.tar.gz: 8fdc1100e82190f7b500468d06227b2171d024fba8998daf38b774b5b9cdab5da5063383990d0048cd9e1ac37cfb4aea604c9096438bff3f8152794df27f6b06
6
+ metadata.gz: 8515ae1d820ac5bf2c010a890e01ffc8175abc7e0836c8ebc5cb138ca9b2f5970e4f9f383df490175cdb7a76e6c119e4da8cdbe2c6177683aa26a4ccdde9b473
7
+ data.tar.gz: 78b78c1716929a3b8f7fc0050a17034b7b9a1046f425d3916a847df82e8f16f13b1470a5d6bbd93bc92e112851a557d8f1292500beae124ee8625fea33bcfbd5
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 = '7.0.10' # Fixed terminal state issue for interactive programs like HyperList
21
+ @version = '7.0.11' # Fixed ESC behavior and GIF preview dimensions
22
22
 
23
23
  # SAVE & STORE TERMINAL {{{1
24
24
  ORIG_STTY = `stty -g`.chomp
@@ -1554,6 +1554,9 @@ end
1554
1554
 
1555
1555
  def tag_pattern # {{{3
1556
1556
  pat = @pB.ask('Tag pattern (ruby regex): ', '')
1557
+ # Reset bottom pane after input
1558
+ @pB.clear; @pB.update = true
1559
+ return if pat.nil? || pat.strip.empty?
1557
1560
  re = Regexp.new(pat)
1558
1561
  matches = @files.grep(re).map { |t| File.join(Dir.pwd, t) }
1559
1562
  matches.each do |f|
@@ -3166,6 +3169,10 @@ def rename_item # {{{3
3166
3169
  new_idx = @files.index(new_basename)
3167
3170
  @index = new_idx if new_idx
3168
3171
  render
3172
+ else
3173
+ # Reset the bottom pane when rename is cancelled
3174
+ @pB.clear
3175
+ @pB.update = true
3169
3176
  end
3170
3177
  end
3171
3178
 
@@ -3297,6 +3304,9 @@ def change_ownership # {{{3
3297
3304
  gnm = Etc.getgrgid(File.stat(@selected).gid).name
3298
3305
  unm = Etc.getpwuid(File.stat(@selected).uid).name
3299
3306
  ans = @pB.ask('Change ownership (user:group): ', "#{unm}:#{gnm}")
3307
+ # Reset bottom pane after input
3308
+ @pB.clear; @pB.update = true
3309
+ return if ans.nil? || ans.strip.empty?
3300
3310
  user, group = ans.split(':')
3301
3311
  uid = Etc.getpwnam(user).uid
3302
3312
  gid = Etc.getgrnam(group).gid
@@ -3313,6 +3323,9 @@ def change_permissions # {{{3
3313
3323
  # strip leading “-” off e.g. "-rwxr-xr-x" → "rwxr-xr-x"
3314
3324
  default = @fileattr.split[1][1..]
3315
3325
  ans = @pB.ask('Permissions: ', default)
3326
+ # Reset bottom pane after input
3327
+ @pB.clear; @pB.update = true
3328
+ return if ans.nil? || ans.strip.empty?
3316
3329
  mode = if ans =~ /^\d{3}$/ # "755"
3317
3330
  ans.to_i(8)
3318
3331
  elsif ans.length == 3 # "rwx" → "rwxrwxrwx"
@@ -3350,12 +3363,20 @@ end
3350
3363
 
3351
3364
  # FILTER AND SEARCH {{{2
3352
3365
  def filter_types # {{{3
3353
- @lsfiles = @pB.ask('Filetype(s) to show: ', @lsfiles)
3366
+ result = @pB.ask('Filetype(s) to show: ', @lsfiles)
3367
+ # Reset bottom pane after input
3368
+ @pB.clear; @pB.update = true
3369
+ return if result.nil?
3370
+ @lsfiles = result
3354
3371
  @pR.update = @pB.update = true
3355
3372
  end
3356
3373
 
3357
3374
  def filter_regex # {{{3
3358
- @lsmatch = @pB.ask('Files match RegEx: ', @lsmatch)
3375
+ result = @pB.ask('Files match RegEx: ', @lsmatch)
3376
+ # Reset bottom pane after input
3377
+ @pB.clear; @pB.update = true
3378
+ return if result.nil?
3379
+ @lsmatch = result
3359
3380
  @pB.say(nil)
3360
3381
  @pR.update = @pB.update = true
3361
3382
  end
@@ -3367,6 +3388,8 @@ end
3367
3388
 
3368
3389
  def search_text # {{{3
3369
3390
  @searched = @pSearch.ask('/ ', '')
3391
+ # Reset bottom pane after search input
3392
+ @pB.clear; @pB.update = true
3370
3393
  l = command("ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}").split
3371
3394
  m = l.each_index.select { |n| l[n] =~ /#{@searched}/ }
3372
3395
  @index = m.first unless m.empty?
@@ -3396,11 +3419,16 @@ end
3396
3419
 
3397
3420
  def grep_current # {{{3
3398
3421
  cmd = @pCmd.ask(': ', 'grep -s MATCH *')
3399
- shellexec(cmd)
3422
+ # Reset bottom pane after command input
3423
+ @pB.clear; @pB.update = true
3424
+ shellexec(cmd) unless cmd.nil? || cmd.strip.empty?
3400
3425
  end
3401
3426
 
3402
3427
  def locate # {{{3
3403
3428
  cmd = @pCmd.ask(': ', 'locate ')
3429
+ # Reset bottom pane after command input
3430
+ @pB.clear; @pB.update = true
3431
+ return if cmd.nil? || cmd.strip.empty?
3404
3432
  cmd += " | #{@bat} -n --color=always"
3405
3433
  shellexec(cmd)
3406
3434
  @locate = true
@@ -3409,7 +3437,11 @@ end
3409
3437
  def jump_locate # {{{3
3410
3438
  @pB.update = true; return unless @locate
3411
3439
 
3412
- nr = @pB.ask('# ', '').to_i
3440
+ input = @pB.ask('# ', '')
3441
+ # Reset bottom pane after input
3442
+ @pB.clear; @pB.update = true
3443
+ return if input.nil? || input.strip.empty?
3444
+ nr = input.to_i
3413
3445
  line = @pR.text.lines[nr - 1]
3414
3446
  unless line
3415
3447
  @pB.say('Error: No such file or directory.'); @pB.update = false; return
@@ -3453,16 +3485,24 @@ def unzip_items # {{{3
3453
3485
  first = @tagged.first
3454
3486
  tar = Shellwords.escape(first)
3455
3487
  cmd = @pCmd.ask('Command: ', "tar xfz #{tar}")
3456
- shellexec(cmd)
3488
+ # Reset bottom pane after command input
3489
+ @pB.clear; @pB.update = true
3490
+ shellexec(cmd) unless cmd.nil? || cmd.strip.empty?
3457
3491
  render
3458
3492
  end
3459
3493
 
3460
3494
  def zip_items # {{{3
3461
3495
  arc = @pCmd.ask('Archive name: ', '')
3496
+ # Reset bottom pane after first input
3497
+ @pB.clear; @pB.update = true
3498
+ return if arc.nil? || arc.strip.empty?
3462
3499
  # escape archive base and all paths
3463
3500
  arc_esc = Shellwords.escape(arc)
3464
3501
  tagged_esc = @tagged.map { |p| Shellwords.escape(p) }.join(' ')
3465
3502
  cmd = @pCmd.ask('Command: ', "tar cfz #{arc_esc}.gz #{tagged_esc}")
3503
+ # Reset bottom pane after second input
3504
+ @pB.clear; @pB.update = true
3505
+ return if cmd.nil? || cmd.strip.empty?
3466
3506
  shellexec(cmd + ' 2>/dev/null')
3467
3507
  render
3468
3508
  end
@@ -4057,7 +4097,9 @@ end
4057
4097
 
4058
4098
  def make_directory # {{{3
4059
4099
  cmd = @pCmd.ask(': ', 'mkdir ')
4060
- shellexec(cmd + ' -p')
4100
+ # Reset bottom pane after command input
4101
+ @pB.clear; @pB.update = true
4102
+ shellexec(cmd + ' -p') unless cmd.nil? || cmd.strip.empty?
4061
4103
  end
4062
4104
 
4063
4105
  def navi_invoke # {{{3
@@ -5438,7 +5480,8 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5438
5480
 
5439
5481
  # Properly escape image path for shell commands
5440
5482
  escaped_image = Shellwords.escape(img_path)
5441
- dimensions = `identify -format "%wx%h" #{escaped_image} 2>/dev/null`
5483
+ # For animated GIFs, get dimensions of first frame only using [0]
5484
+ dimensions = `identify -format "%wx%h" #{escaped_image}[0] 2>/dev/null`
5442
5485
  img_w, img_h = dimensions.split('x').map(&:to_i)
5443
5486
 
5444
5487
  # Fix: Use simultaneous scaling to prevent overflow
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: 7.0.10
4
+ version: 7.0.11
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-08-23 00:00:00.000000000 Z
11
+ date: 2025-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcurses
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '7.4'
55
55
  description: |-
56
- RTFM v7.0.10: Fixed terminal state issue causing multiple keypresses required in interactive programs like HyperList.
56
+ RTFM v7.0.11: Fixed ESC key behavior to properly restore bottom pane after cancelling actions. Fixed animated GIF preview dimensions issue.
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: