rtfm-filemanager 3.9 → 3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rtfm +23 -21
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebffa8209855842bb1f85971814b3596c48530543ea7840841e96698ae5043bd
|
4
|
+
data.tar.gz: 80ff8bf414f6349576d97ef8867f227737b1d58ca8e037255ac7d1c492a57ff5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0055e265aa75f6aba0e8092550eea179fb232d98549fad0ea22c241e71c794fd2fb583ae7f3f0b629001823c924b8f38d9dc339d0dd83f24b3e851a2bc078493
|
7
|
+
data.tar.gz: 982c7e5a217e1d4f6700c9a1b1bfd3e6cb72650902251aea6613a8ea22d9c0560bfb4f4dc0fac7a88b1244f6f38f19356b3b4527537542844bc3b746552545ca
|
data/bin/rtfm
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
# for any damages resulting from its use. Further, I am under no
|
15
15
|
# obligation to maintain or extend this software. It is provided
|
16
16
|
# on an 'as is' basis without any expressed or implied warranty.
|
17
|
-
@version = "3.
|
17
|
+
@version = "3.11"
|
18
18
|
|
19
19
|
# PRELIMINARIES
|
20
20
|
@help = <<HELPTEXT
|
@@ -956,7 +956,7 @@ def get_files(win) # The core of the directory listings
|
|
956
956
|
ls_cmd = "ls 2>/dev/null #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}" # Get files in current directory
|
957
957
|
ls_cmd += @selected_safe if win == "right"
|
958
958
|
@cfiles = `#{ls_cmd} --color`.split("\n")
|
959
|
-
@files = @cfiles.map {|f| f.sub(
|
959
|
+
@files = @cfiles.map {|f| f.sub(/^.*\d+m(.+)\e\[0m/, '\1')}
|
960
960
|
ls_cmd += " -H " if win == "right"
|
961
961
|
ls_cmd += %q[ -lh --time-style="long-iso" | awk '{printf "%s%s%s%11s%6s%6s", $1, " " $3, ":" $4,$6,$7,$5"\n"}']
|
962
962
|
@fspes = `#{ls_cmd}`.split("\n").drop(1)
|
@@ -1433,10 +1433,11 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1433
1433
|
@history.insert(stk, text)
|
1434
1434
|
pos = @history[stk].length
|
1435
1435
|
chr = ""
|
1436
|
+
@history_copy = @history.map(&:clone)
|
1436
1437
|
while chr != "ENTER"
|
1437
1438
|
@w_b.setpos(0,0)
|
1438
1439
|
init_pair(250, 250, 238)
|
1439
|
-
text = pretext + @
|
1440
|
+
text = pretext + @history_copy[stk]
|
1440
1441
|
text += " " * (@w_b.maxx - text.length) if text.length < @w_b.maxx
|
1441
1442
|
@w_b.attron(color_pair(250)) { @w_b << text }
|
1442
1443
|
@w_b.setpos(0,pretext.length + pos)
|
@@ -1451,50 +1452,50 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1451
1452
|
case chr
|
1452
1453
|
when 'UP'
|
1453
1454
|
unless @w_b.nohistory
|
1454
|
-
unless stk == @
|
1455
|
+
unless stk == @history_copy.length - 1
|
1455
1456
|
stk += 1
|
1456
|
-
pos = @
|
1457
|
+
pos = @history_copy[stk].length
|
1457
1458
|
end
|
1458
1459
|
end
|
1459
1460
|
when 'DOWN'
|
1460
1461
|
unless @w_b.nohistory
|
1461
1462
|
unless stk == 0
|
1462
1463
|
stk -= 1
|
1463
|
-
pos = @
|
1464
|
+
pos = @history_copy[stk].length
|
1464
1465
|
end
|
1465
1466
|
end
|
1466
1467
|
when 'RIGHT'
|
1467
|
-
pos += 1 unless pos > @
|
1468
|
+
pos += 1 unless pos > @history_copy[stk].length
|
1468
1469
|
when 'LEFT'
|
1469
1470
|
pos -= 1 unless pos == 0
|
1470
1471
|
when 'HOME'
|
1471
1472
|
pos = 0
|
1472
1473
|
when 'END'
|
1473
|
-
pos = @
|
1474
|
+
pos = @history_copy[stk].length
|
1474
1475
|
when 'DEL'
|
1475
|
-
@
|
1476
|
+
@history_copy[stk][pos] = ""
|
1476
1477
|
when 'BACK'
|
1477
1478
|
unless pos == 0
|
1478
1479
|
pos -= 1
|
1479
|
-
@
|
1480
|
+
@history_copy[stk][pos] = ""
|
1480
1481
|
end
|
1481
1482
|
when 'WBACK'
|
1482
1483
|
unless pos == 0
|
1483
|
-
until @
|
1484
|
+
until @history_copy[stk][pos - 1] == " " or pos == 0
|
1484
1485
|
pos -= 1
|
1485
|
-
@
|
1486
|
+
@history_copy[stk][pos] = ""
|
1486
1487
|
end
|
1487
|
-
if @
|
1488
|
+
if @history_copy[stk][pos - 1] == " "
|
1488
1489
|
pos -= 1
|
1489
|
-
@
|
1490
|
+
@history_copy[stk][pos] = ""
|
1490
1491
|
end
|
1491
1492
|
end
|
1492
1493
|
when 'LDEL'
|
1493
|
-
@
|
1494
|
+
@history_copy[stk] = ""
|
1494
1495
|
pos = 0
|
1495
1496
|
when 'TAB' # Tab completion of dirs and files
|
1496
1497
|
p1 = pos - 1
|
1497
|
-
c = @
|
1498
|
+
c = @history_copy[stk][0..(p1)].sub(/^.* /, '')
|
1498
1499
|
p0 = p1 - c.length
|
1499
1500
|
compl = File.expand_path(c)
|
1500
1501
|
compl += "/" if Dir.exist?(compl)
|
@@ -1529,20 +1530,21 @@ def w_b_getstr(pretext, text) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1529
1530
|
Curses.echo
|
1530
1531
|
end
|
1531
1532
|
end
|
1532
|
-
@
|
1533
|
+
@history_copy[stk].sub!(c,compl)
|
1533
1534
|
pos = pos - c.length + compl.length
|
1534
1535
|
when /^.$/
|
1535
|
-
@
|
1536
|
+
@history_copy[stk].insert(pos,chr)
|
1536
1537
|
pos += 1
|
1537
1538
|
end
|
1538
1539
|
while STDIN.ready?
|
1539
1540
|
chr = STDIN.getc
|
1540
|
-
@
|
1541
|
+
@history_copy[stk].insert(pos,chr)
|
1541
1542
|
pos += 1
|
1542
1543
|
end
|
1543
1544
|
end
|
1544
|
-
curstr = @
|
1545
|
-
@
|
1545
|
+
curstr = @history_copy[stk]
|
1546
|
+
@history_copy.shift if @w_b.nohistory
|
1547
|
+
@history.insert(0, @history_copy[stk])
|
1546
1548
|
unless @w_b.nohistory
|
1547
1549
|
@history.uniq!
|
1548
1550
|
@history.compact!
|
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: '3.
|
4
|
+
version: '3.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: 2023-05-
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -47,8 +47,7 @@ dependencies:
|
|
47
47
|
description: 'A full featured terminal browser with syntax highlighted files, images
|
48
48
|
shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
|
49
49
|
easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
|
50
|
-
other features. New in 3.
|
51
|
-
control chars in input.'
|
50
|
+
other features. New in 3.11: Better history handling.'
|
52
51
|
email: g@isene.com
|
53
52
|
executables:
|
54
53
|
- rtfm
|