rtfm-filemanager 2.3.1 → 2.4
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/README.md +2 -0
- data/bin/rtfm +28 -11
- 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: 7217e989066b31a7b738092805fa9c7f8b261afdf0444937fc1286cd19ad7658
|
4
|
+
data.tar.gz: 4cf34fe9ef723ec6f2829d6bce59c2128a9ee7878665069732bfc5270b5437cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7320de7f8f7775d231163e927b0219c4113747de0eebdd7e52697d645420023e92958157552e0300ed1bd404f85f6bcdac01fe77017631da6f9b205906a49556
|
7
|
+
data.tar.gz: 31f08dbab26ccaa324498c621d1547a1e205ed908538628e8494d57dcc3b8b676f9fa950f83d9e2d39a1fe4cd0a97280ca36e2b0173374b863a7c9602664b760
|
data/README.md
CHANGED
@@ -168,6 +168,8 @@ P | PUT (move) tagged items here
|
|
168
168
|
s | Create symlink to tagged items here
|
169
169
|
d | Delete selected item and tagged items. Press 'y' to confirm
|
170
170
|
c | Change/rename selected (adds command to bottom window)
|
171
|
+
z | Extract tagged zipped archive to current directory
|
172
|
+
Z | Create zipped archive from tagged files/directories
|
171
173
|
|
172
174
|
### Directory views
|
173
175
|
|
data/bin/rtfm
CHANGED
@@ -67,6 +67,8 @@ MANIPULATE ITEMS
|
|
67
67
|
s = Create symlink to tagged items here
|
68
68
|
d = Delete selected item and tagged items. Press 'y' to confirm
|
69
69
|
c = Change/rename selected (adds command to bottom window)
|
70
|
+
z = Extract tagged zipped archive to current directory
|
71
|
+
Z = Create zipped archive from tagged files/directories
|
70
72
|
|
71
73
|
DIRECTORY VIEWS
|
72
74
|
a = Show all (also hidden) items
|
@@ -528,6 +530,21 @@ def main_getkey # GET KEY FROM USER
|
|
528
530
|
w_b_info(err.to_s)
|
529
531
|
end
|
530
532
|
@w_r.update = true
|
533
|
+
when 'z'
|
534
|
+
cmd = w_b_getstr("Command = ", "tar xfz #{@tagged.first}")
|
535
|
+
begin
|
536
|
+
w_b_exec(cmd + " 2>/dev/null")
|
537
|
+
rescue StandardError => err
|
538
|
+
w_b_info(err.to_s)
|
539
|
+
end
|
540
|
+
when 'Z'
|
541
|
+
arc = w_b_getstr("Archive name: ", "")
|
542
|
+
cmd = w_b_getstr("Command = ", "tar cfz #{arc}.gz #{@tagged.join(" ")}")
|
543
|
+
begin
|
544
|
+
w_b_exec(cmd + " 2>/dev/null")
|
545
|
+
rescue StandardError => err
|
546
|
+
w_b_info(err.to_s)
|
547
|
+
end
|
531
548
|
# DIRECTORY VIEWS
|
532
549
|
when 'a' # Show all items
|
533
550
|
@lsall == "" ? @lsall = "-a" : @lsall = ""
|
@@ -696,7 +713,7 @@ def main_getkey # GET KEY FROM USER
|
|
696
713
|
when '/' # Get search string to mark items that match the input
|
697
714
|
@w_b.nohistory = true
|
698
715
|
@searched = w_b_getstr("/ ", "")
|
699
|
-
l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
|
716
|
+
l = `ls 2>/dev/null #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
|
700
717
|
m = l.each_index.select{|n| l[n] =~ /#{@searched}/}
|
701
718
|
@index = m[0] unless m == []
|
702
719
|
@index = 0 if @searched == ""
|
@@ -704,7 +721,7 @@ def main_getkey # GET KEY FROM USER
|
|
704
721
|
when '\\'
|
705
722
|
@searched = ""
|
706
723
|
when 'n' # Jump to next occurence of search (after '/')
|
707
|
-
l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
|
724
|
+
l = `ls 2>/dev/null #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
|
708
725
|
m = l.each_index.select{|n| l[n] =~ /#{@searched}/}
|
709
726
|
i = m.find { |n| n > @index }
|
710
727
|
if i == nil
|
@@ -714,7 +731,7 @@ def main_getkey # GET KEY FROM USER
|
|
714
731
|
end
|
715
732
|
@w_r.update = true
|
716
733
|
when 'N' # Jump to previous occurence of search (after '/')
|
717
|
-
l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
|
734
|
+
l = `ls 2>/dev/null #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
|
718
735
|
m = l.each_index.select{|n| l[n] =~ /#{@searched}/}.reverse
|
719
736
|
i = m.find { |n| n < @index }
|
720
737
|
if i == nil
|
@@ -830,18 +847,18 @@ def mark_latest
|
|
830
847
|
@marks["'"] = Dir.pwd
|
831
848
|
end
|
832
849
|
def get_files(win) # The core of the directory listings
|
833
|
-
ls_cmd = "ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}" # Get files in current directory
|
850
|
+
ls_cmd = "ls 2>/dev/null #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}" # Get files in current directory
|
834
851
|
ls_cmd += @selected_safe if win == "right"
|
835
|
-
@files = `#{ls_cmd}
|
852
|
+
@files = `#{ls_cmd}`.split("\n")
|
836
853
|
ls_cmd += " -H " if win == "right"
|
837
|
-
ls_cmd += %q[ -lhgG --time-style="long-iso"
|
838
|
-
@fspes = `#{ls_cmd}
|
854
|
+
ls_cmd += %q[ -lhgG --time-style="long-iso" | awk '{printf "%s%12s%6s%6s%5s", $1,$4,$5,$3,$2 "\n"}']
|
855
|
+
@fspes = `#{ls_cmd}`.split("\n").drop(1)
|
839
856
|
if @lsfiles != "" or @lsmatch != ""
|
840
857
|
lsf = @lsfiles.split(",").map! {|e| e.strip}
|
841
|
-
dir_cmd = "ls -d "
|
858
|
+
dir_cmd = "ls 2>/dev/null -d "
|
842
859
|
dir_cmd += @selected_safe + "/" if win == "right"
|
843
860
|
dir_cmd += "*/"
|
844
|
-
dirs = `#{dir_cmd}
|
861
|
+
dirs = `#{dir_cmd}`.split("/\n")
|
845
862
|
dirs.map!{|d| d.sub!(/.*\//, '')} if win == "right"
|
846
863
|
@files = @files - dirs
|
847
864
|
@fspes = @fspes - dirs
|
@@ -1406,10 +1423,10 @@ def w_b_exec(cmd) # EXECUTE COMMAND FROM @W_B
|
|
1406
1423
|
@w_r.clr
|
1407
1424
|
begin
|
1408
1425
|
@w_r.pager_cmd = "#{cmd} | #{@bat} -n --color=always 2>/dev/null"
|
1409
|
-
@w_r.text = `#{@w_r.pager_cmd}
|
1426
|
+
@w_r.text = `#{@w_r.pager_cmd}`
|
1410
1427
|
rescue
|
1411
1428
|
@w_r.pager_cmd = "#{cmd} 2>/dev/null"
|
1412
|
-
@w_r.text = `#{@w_r.pager_cmd}
|
1429
|
+
@w_r.text = `#{@w_r.pager_cmd}`
|
1413
1430
|
end
|
1414
1431
|
unless @w_r.text == "" or @w_r.text == nil
|
1415
1432
|
pager_start
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtfm-filemanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: '2.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
@@ -47,7 +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 2.
|
50
|
+
other features. New in 2.4: Added archive creation (key=Z) and extraction (key=z)'
|
51
51
|
email: g@isene.com
|
52
52
|
executables:
|
53
53
|
- rtfm
|