rtfm-filemanager 6.0.4 → 6.0.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 +34 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e57bcca8413887a30c4bb05ba3d370e1485d223e88d7b6aeea2c1fb6008f85f
|
4
|
+
data.tar.gz: d067fd93312f608a7e5f4ad05135dcb023660172e0209431b83637698946b9b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f793a2db1076bdf286356b746444eb88afd6f88e25cf58b15ebbe0f20bef404fa0153718c9dc0b9200ffaa2d318829b57bffff44e7c1518416f030b5eb5cd8e2
|
7
|
+
data.tar.gz: 2e7d0e4a7bee42b0821ed29d6534366cad37d19029abd745e2060a07993b5c33d738a85cfb1505fd61e15f0ca9c48524f5be4e169384b012ae3b319145602233
|
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 = '6.0.
|
21
|
+
@version = '6.0.5' # Fixed symlink following and command bar cd functionality
|
22
22
|
|
23
23
|
# SAVE & STORE TERMINAL {{{1
|
24
24
|
ORIG_STTY = `stty -g`.chomp
|
@@ -1406,7 +1406,21 @@ def follow_symlink # {{{3
|
|
1406
1406
|
@symlink_history.add(resolved_path)
|
1407
1407
|
target = File.readlink(@selected)
|
1408
1408
|
target = File.expand_path(target, File.dirname(@selected)) unless target.start_with?('/')
|
1409
|
-
|
1409
|
+
|
1410
|
+
# Check if target is a directory or file
|
1411
|
+
if File.directory?(target)
|
1412
|
+
Dir.chdir(target)
|
1413
|
+
elsif File.file?(target)
|
1414
|
+
# If it's a file, change to the directory containing the file
|
1415
|
+
target_dir = File.dirname(target)
|
1416
|
+
Dir.chdir(target_dir)
|
1417
|
+
# Select the target file in the new directory
|
1418
|
+
@selected = target
|
1419
|
+
else
|
1420
|
+
@pB.say("Error: Symlink target does not exist or is not accessible".fg(196))
|
1421
|
+
@symlink_history&.clear
|
1422
|
+
return
|
1423
|
+
end
|
1410
1424
|
|
1411
1425
|
# Clear history after successful navigation
|
1412
1426
|
@symlink_history.clear
|
@@ -3865,6 +3879,24 @@ def command_mode # {{{3
|
|
3865
3879
|
sel = Shellwords.escape(@selected.to_s)
|
3866
3880
|
tg = @tagged.map { |p| Shellwords.escape(p) }.join(' ')
|
3867
3881
|
cmd = raw.gsub('@s', sel).gsub('@t', tg)
|
3882
|
+
|
3883
|
+
# Handle cd commands specially
|
3884
|
+
if cmd.match(/^\s*cd\s*(.*)$/)
|
3885
|
+
target = $1.strip
|
3886
|
+
target = ENV['HOME'] if target.empty? # Default to home directory
|
3887
|
+
target = File.expand_path(target)
|
3888
|
+
|
3889
|
+
if File.directory?(target)
|
3890
|
+
@directory[Dir.pwd] = @index; mark_latest
|
3891
|
+
Dir.chdir(target)
|
3892
|
+
@pB.update = @pR.update = true
|
3893
|
+
refresh
|
3894
|
+
return
|
3895
|
+
else
|
3896
|
+
@pB.say("cd: #{target}: No such directory".fg(196))
|
3897
|
+
return
|
3898
|
+
end
|
3899
|
+
end
|
3868
3900
|
# Determine program name
|
3869
3901
|
prog = Shellwords.split(cmd).first
|
3870
3902
|
prog = File.basename(prog) if prog
|
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: 6.0.
|
4
|
+
version: 6.0.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-07-
|
11
|
+
date: 2025-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rcurses
|